-
Notifications
You must be signed in to change notification settings - Fork 520
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
NullPointerException in ring.middleware.multipart-params middleware #355
Comments
For CircleCI reference, this is tracked in Rollbar. |
Some relevant dependencies:
|
My guess is that this is caused by incoming requests that have a content-type of "multipart/form-data" but have no associated body. The If I'm right, then the fix is to add a check to this function to ensure that the body is not |
Hi James, thanks for the pointers. I can't quite reproduce - I'm getting a similar but different error when setting
|
I'm wondering what the correct way to handle if
It's arguable that some of these are 4xx (size, context type) are some are 5xx (IO). |
You can reproduce this by creating an empty file such as curl --data-binary @hoge.bin -H "Content-Type: multipart/form-data; boundary=Boundary+0xAbCdEfGbOuNdArY" localhost:3000/path/with/multipart/middleware Trying to upload an empty file (Content-Length: 0) 100% results in the exception, so @weavejester's guess about the empty body is correct. (Reproduced with latest clj-commons/aleph) |
Hi there,
We are getting an NPE thrown from the
ring.middleware.multipart-params
and I don't know where to start looking to track the problem down. Any help would be appreciated.This happens very rarely, 19 times in the last 7 days, on a HTTP endpoint that is accessed many, many thousands of times per day.
The exception is thrown from the
org.apache.commons.fileupload
library, which is called fromring.middleware.multipart-params
. There are a couple of our middleware items on the callstack, but I don't think these are very likely to be the cause.Callstack
Some context we have gathered:
In all cases, the User Agent is either
PostmanRuntime/7.4.0
orPostmanRuntime/7.3.0
.The text was updated successfully, but these errors were encountered: