Roy T. Fielding wrote:

client uses HTTP/1.1 to POST a 2MB file, to be handled by a module...
module says no way and returns 413...
admin has "ErrorDocument 413 http://file_too_big.html";...
Apache sends back 302 with Location=http://file_too_big.html, but since this is HTTP/1.1, Apache then tries to read the next request and blows up (invalid method in request)...


It sends 302? Don't you mean it does a subrequest? I'd hope so.

As Cliff says, this is a redirect, not a subrequest.


Here's an example from the failure scenario. We send the browser 302 from the POST and we then try to read the body of the POST request as the next request line.

[17/Oct/2003:12:13:25 -0400] "POST /servlet/Silly HTTP/1.1" 302 346
[17/Oct/2003:12:13:25 -0400] "-----------------------------7d32042f1603aa" 501 -
(If this were Mozilla, we'd also see the GET for the error document here.)

And with the patch, much more happiness.

[17/Oct/2003:12:20:09 -0400] "POST /servlet/Silly HTTP/1.1" 302 346
[17/Oct/2003:12:20:10 -0400] "GET /413.html HTTP/1.1" 200 23




Reply via email to