Opened 8 weeks ago
Last modified 7 weeks ago
#13789 assigned defect
POST request to tracd with multipart 1.0.0 is stuck
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | web frontend/tracd | Version: | 1.6 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The form-data parser in multipart module attempts to read data from a Request instance more than Content-Length bytes. It is intent that an empty bytes is received if EOF reached, however, it is stuck when tracd is used.
Attachments (0)
Change History (2)
comment:2 by , 7 weeks ago
Replying to Jun Omae:
Workaround:
WSGI specification, PEP 3333 – Python Web Server Gateway Interface v1.0.1 | peps.python.org, says:
The server is not required to read past the client’s specified Content-Length, and should simulate an end-of-file condition if the application attempts to read past that point. The application should not attempt to read more data than is specified by the CONTENT_LENGTH variable.
So that, we should provide WSGIInput
class in the workaround to simulate EOF condition.
Workaround:
trac/web/wsgi.py