BTW, don't expect to see your nice message in the browser even when using 413. Because a browser not implementing 100-continue as it should, they usually don't try and deal with a response before sending all data. Because Apache will close input side of connection, the browser will fail sending all the content and general throws up a nasty connection error rather than read the error response and show it.
Graham On 25 November 2011 07:28, Graham Dumpleton <[email protected]> wrote: > Do you mean sent rather than read? > > Except for Opera, browsers don't implement 100-continue and so the > browser will always send the huge upload anyway. If the browser said > it is using HTTP/1.1 then Apache doesn't have a choice but to still > read the entire request content to throw it away if you return a 200 > response. This is because there may be another request following the > first over the same connection. So the problem is the browsers that > send the data anyway. > > Try your test again but don't return a 200 response, instead return a > 413 request entity too large error response. When a non 200 response > is returned Apache will know it is an error and should just send the > response and not also try and consume the request content as when it > is an error response browsers aren't supposed to send a subsequent > request over the same connection. > > Graham > > On 25 November 2011 07:00, Lisper <[email protected]> wrote: >> No, the problem is that the entire file is (apparently) read by modwsgi >> before the application code is run at all. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "modwsgi" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/modwsgi/-/tQ3BVEA08bAJ. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/modwsgi?hl=en. >> > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
