-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
`handle_empty_content!': EOFError (EOFError) #1603
Comments
I don't think it's related to #1536. It's related to #1572, a bugfix for #761. It appears the request you are submitting is malformed, specifying a multipart body when no body is provided. Rack used to swallow this error, but we think that was a mistake. Is there a reason you think Rack should silently ignore a malformed request in this case? |
Thanks for a reply. I got it, This issue related #1572. That's right, It's a illegal HTTP request. I want the server to return a 400 (bad request). What do you think? |
What about other kinds of errors e.g. invalid headers, other kinds of invalid body etc. |
I misunderstood, But, |
I think this would be okay. |
This makes it simpler to catch this specific error. Fixes rack#1603
…ing empty body This makes it simpler to catch this specific error. Fixes rack#1603
The Apparently that integrated web overlay sends the Here's an anonymized curl call of a request failing in rack 2.2.x that worked in 2.1.x:
|
Interesting that something that popular could be so broken. RFC2046 makes it clear that multipart content needs a body (https://tools.ietf.org/html/rfc2046#section-5.1):
I'm still open to using a separate class for this, as my pull request (#1688) does. However, it has not been reviewed yet. |
I don't have a strong opinion about this, but I do concern that we make system more complex to solve the problem. It doesn't bother me a huge amount but handling many edge cases becomes maintenance burden. |
…ing empty body This makes it simpler to catch this specific error. Fixes rack#1603
…ing empty body This makes it simpler to catch this specific error. Fixes #1603
The post was issuing a multi-part post with body. That is a malformed request and starting with Rack 2.2.2 will generate an exception. rack/rack#1603 This fixes that issue.
The post was issuing a multi-part post with body. That is a malformed request and starting with Rack 2.2.2 will generate an exception. rack/rack#1603 This fixes that issue.
If a event chain is halted, it fires the 'V:eventsHalted' event. That can be handled so that the default error handling does not kick in and you can handle it yourself. The post was issuing a multi-part post with body. That is a malformed request and starting with Rack 2.2.2 will generate an exception. rack/rack#1603 This fixes that issue.
The post was issuing a multi-part post with body. That is a malformed request and starting with Rack 2.2.2 will generate an exception. rack/rack#1603 This fixes that issue.
The post was issuing a multi-part post with body. That is a malformed request and starting with Rack 2.2.2 will generate an exception. rack/rack#1603 This fixes that issue.
If a event chain is halted, it fires the 'V:eventsHalted' event. That can be handled so that the default error handling does not kick in and you can handle it yourself. The post was issuing a multi-part post with body. That is a malformed request and starting with Rack 2.2.2 will generate an exception. rack/rack#1603 This fixes that issue.
Go's http.client's automatic redirection uses the same Content-Type for GET. This request is invalid in rack 2.2. I don't know if the Go implementation is wrong or the rack implementation is wrong. I will use the old rack for now. refs: rack/rack#1603 refs: #204
Go's http.client's automatic redirection uses the same Content-Type for GET. This request is invalid in rack 2.2. I don't know if the Go implementation is wrong or the rack implementation is wrong. I will use the old rack for now. refs: rack/rack#1603 refs: #204
Go's http.client's automatic redirection uses the same Content-Type for GET. This request is invalid in rack 2.2. I don't know if the Go implementation is wrong or the rack implementation is wrong. I will use the old rack for now. refs: rack/rack#1603 refs: #204
Hi,
I updated
rack@2.1.x
torack@2.2.2
.Since then, rack raises EOFError when send the following request.
curl -X POST -H 'Content-Type: multipart/form-data; boundary=dummy' http://localhost:3000/post-end-point
I think this error related PR#1536.
Is this the intended behavior?
best, regards.
The text was updated successfully, but these errors were encountered: