If using jetty, we can simply add the org.eclipse.jetty.multipartConfig attribute and we will have in the #queryParams our multiparts strings.
If using tomcat, we dont need to add the attribute but we have to add to the catalina context the allowCasualMultipartParsing=true. Yet, Spark will only add our multiparts strings to the #queryParams in POST ops. If we do a PUT / PATCH (which also support multipart...) we dont have them and we have to retrieve them from the raw parts on our own.
This is not any serious bug, since parsing the byte content is really easy, but its a weird behavior (some operations parse them and others dont)
Could we have this standarized ? I mean, either the dev has to parse the content in all operations, or spark automatically parses them in all operations.
If using jetty, we can simply add the
org.eclipse.jetty.multipartConfig
attribute and we will have in the#queryParams
our multiparts strings.If using tomcat, we dont need to add the attribute but we have to add to the catalina context the
allowCasualMultipartParsing=true
. Yet, Spark will only add our multiparts strings to the#queryParams
in POST ops. If we do a PUT / PATCH (which also support multipart...) we dont have them and we have to retrieve them from the raw parts on our own.This is not any serious bug, since parsing the byte content is really easy, but its a weird behavior (some operations parse them and others dont)
Could we have this standarized ? I mean, either the dev has to parse the content in all operations, or spark automatically parses them in all operations.