If I recall correctly, when I wrote the code to read uploaded files, it was one chunk at a time (eg 4096 bytes). Wouldn't this give you the opportunity to stop at the right point?
take a look at github.com/appcove/AppStruct ... Python/AppStruct/WSGI/Lib.py (or related, maybe werkseug.py) to see the code.
Take care.
--
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/-/rEYG3K-zj74J.
To post to this group, send email to mod...@googlegroups.com.
To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
I am pretty sure this is not the case...
Looking forward to Graham's comments.
Look at docs on environ['wsgi.input'].
Thanks!
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.
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 <ron.g...@gmail.com> 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.
Graham