You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2022/11/30 22:12:42 UTC

[GitHub] [jena] afs commented on a diff in pull request #1645: GH-1643: Replace commons-fileload

afs commented on code in PR #1645:
URL: https://github.com/apache/jena/pull/1645#discussion_r1036492716


##########
jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/DataUploader.java:
##########
@@ -102,6 +102,10 @@ public static UploadDetails incomingData(HttpAction action, StreamRDF dest) {
         }
     }
 
+    // Jetty requires a setting of this annotation object as a request attribute.
+     private static MultipartConfigElement multipartConfigElement = new MultipartConfigElement("");
+     private static String multipartAttributeName = org.eclipse.jetty.server.Request.__MULTIPART_CONFIG_ELEMENT;

Review Comment:
   > Do you know if this __MULTIPART_CONFIG_ELEMENT attribute was created this way to discourage external use?
   
   I'll check some more. Using the annotation `@MultipartConfig` on FusekiFilter does not work (it's not a servlet).
   
   The name is Jetty specific which is why it is protected by the `getAttribute`.  Jetty source code likes leading `_`'s. See `org.eclipse.jetty.server.Request`.
   
   I'm unsure if Tomcat needs anything special. I haven't managed to find a mention one way or the other.
   
   PS: https://stackoverflow.com/questions/8047173/how-to-use-httpservletrequestgetparts-in-a-servlet-filter-running-on-tomcat
   
   got me to:
   
   https://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes
   
   Set `allowCasualMultipartParsing`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org