-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-4374: Eliminate commons-fileupload dependency #4375
GH-4374: Eliminate commons-fileupload dependency #4375
Conversation
1d1bb8d
to
b4608fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the toLowerCase is removed it can be merged. But feel free to convince me that it should stay :)
if (contentType == null) { | ||
return false; | ||
} | ||
if (contentType.toLowerCase(Locale.ENGLISH).startsWith("multipart/")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the multipart/ must always be lowercase when coming from a header so my gut feeling is that enforcing a lowercase is not needed and may even be a point of failure in the future. e.g. badly configured method filtering on a proxy assuming the lowercase rule being by passed by accepting uppercase headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just in-lined the code from commons-fileupload when removing the dependency, to ensure we don't break anything. Is that a good enough argument? IMO better safe than sorry, even if I tend to agree with you. ;-)
tools/workbench/src/main/java/org/eclipse/rdf4j/workbench/base/TransformationServlet.java
Outdated
Show resolved
Hide resolved
b4608fe
to
4699e98
Compare
It took me a while longer than expected to get back to this (the docker ecosystem is even more of a hot mess than I remember from when I last had to reinstall this stuff - took me six attempts to install the correct versions of all the bits). Unfortunately, when trying to upload an RDF file via the workbench, immediately ran into this:
I'll take a look if adding the annotation in |
It does not seem to a case of simply adding this to You can find some instructions on how to build and run a local docker image in |
@abrokenjester No worries! I suspected this, and will take another look. Could you share your test setup, or is it documented somewhere? |
Sorry, I need to read before I write. 😂 |
2e9a29f
to
894b01e
Compare
@abrokenjester I am having trouble getting this to work in my local environment. The first issue was Next issue I am still trying to resolve is that I cannot access the workbench app from my browser. My setup is a bit complex, so I am reaching out to a colleague. I have now moved the multi-part annotation to all concrete subclasses - since the annotation is not inherited. If you can take another look now at smoke testing, it would be greatly appreciated! I will try to fix my local environment, but I have no idea how the workbench works. So I will probably have a hard time knowing how to test/verify if this is working now. |
894b01e
to
c89c620
Compare
9a8b9a7
to
c77668b
Compare
c77668b
to
8c72872
Compare
8c72872
to
19c7f3c
Compare
After seeing this comment in
And being able to run the workbench locally after #4447, I think this works now! 😅 It was simpler to change than expected. Maybe you can take another look @abrokenjester? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and workbench appears to work fine. Tested file uploads, exports, queries, updates, and repo creation. 👍
In discussion current solution was considered acceptable.
Thanks for verifying, @abrokenjester! ❤️ Could we get this merged? |
GitHub issue resolved: #4374
Briefly describe the changes proposed in this PR:
Removing the dependency to commons-fileupload is a pre-requirement to the javax -> jakarta migration proposed in #3559.
I did the simplest thing to remove the dependency, and IMO the affected code should be refactored more, but I am leaving this to a follow-up PR.
PR Author Checklist (see the contributor guidelines for more details):
mvn process-resources
to format from the command line)