Closed Bug 746877 Opened 13 years ago Closed 9 years ago

HTTP 413 Request entity too large overridden by TCP RST

Categories

(Core :: Networking: HTTP, enhancement)

x86_64
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 839078

People

(Reporter: shawnlandden, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 Build ID: 20120410121533 Steps to reproduce: attached a large file for a POST request I tried with pipelining on and off. but did not wireshark with pipelining off selecting trunk cause i reproduced it on fennec nightly Actual results: large wait, firefox kept sending data (i used wireshark), and eventually shows "connection reset" page Expected results: should show either a generic 413 page, or the content body that web server sends. Should immediately stop sending data after recieving 413 message. Here is the full response that nginx sent: HTTP/1.1 413 Request Entity Too Large Server: nginx/1.0.10 Date: Thu, 19 Apr 2012 02:30:46 GMT Content-Type: text/html Content-Length: 199 Connection: close <html> <head><title>413 Request Entity Too Large</title></head> <body bgcolor="white"> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.0.10</center> </body> </html>
Component: General → DOM: Core & HTML
Summary: firefox keep sending POST data and shows "connection reset" after HTTP 413 Request entity too large → violates http standard. keeps sending POST data and shows "connection reset" after HTTP 413 Request entity too large
Component: DOM: Core & HTML → Networking: HTTP
QA Contact: general → networking.http
I believe nginx is sending the 413 and then closing the socket, when firefox continues to send the post nginx responds with a tcp rst. When we get the rst we treat it out-of-band and report connection reset by peer - which is true enough as far as it goes. There is no spec violation here as far as I can tell - please provide a specific pointer if there is something in 2616 or even httpbis that is in conflict. This also has nothing to do with pipelines that I can see. It would be good if we read the response data after getting the reset so as to provide the response that the server provided - so that's a good enhancement.
Severity: normal → enhancement
Summary: violates http standard. keeps sending POST data and shows "connection reset" after HTTP 413 Request entity too large → HTTP 413 Request entity too large overridden by TCP RST
@mcmanus thanks for the writeup on what is happening
after a little reading here it appears the OS handling in light of the RST is correct - basically any unconsumed data is dumped. And in this case we haven't consumed the response because we're still trying to send the request. What would be necessary is a higher level change of periodically checking the response side of things while we are generating the request.
the best we can do here is a dup of 839078, or using h2 where the stream can be closed without the tcp connection being closed.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.