#13756: File upload not working under Tomcat -------------------------------------+------------------------------- Reporter: SvenKlemm | Owner: nobody Type: Bug | Status: closed Milestone: | Component: HTTP handling Version: 1.2 | Severity: Normal Resolution: invalid | Keywords: Triage Stage: Accepted | Has patch: 1 Needs documentation: 0 | Needs tests: 1 Patch needs improvement: 0 | Easy pickings: 0 -------------------------------------+------------------------------- Changes (by aaugustin):
* status: new => closed * resolution: => invalid * needs_tests: 0 => 1 * easy: => 0 Comment: I'm following up on Jeff250's comment. PEP 3333 says that `wsgi.input` is: > An input stream (file-like object) from which the HTTP request body bytes can be read. (The server or gateway may perform reads on-demand as requested by the application, or it may pre- read the client's request body and buffer it in-memory or on disk, or use any other technique for providing such an input stream, according to its preference.) It adds that: > The semantics of each method are as documented in the Python Library Reference ---- In the Python Library Reference, the semantic of [file-like object].read() is: > Read at most size bytes from the file (less if the read hits EOF before obtaining size bytes). ---- This means that: - WSGI does require a `wsgi.input` file object that blocks on reads until a buffer of ''exactly'' the requested length is returned, or EOF / Content-Length is reached, - the bug is in `modjy`, which does not provide an appropriate file-like object right now. -- Ticket URL: <https://code.djangoproject.com/ticket/13756#comment:5> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.