Opened 6 years ago

Closed 6 years ago

#6973 defect closed wontfix (wontfix)

PotentialDataLoss causes spurious errors on spec compliant HTTP servers

Reported by: Yuri Kunde Schlesner Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: jknight Branch:


If a HTTP server does not send Content-Length, PotentialDataLoss is raised by the http client.

As said in servers are recommended, but not required, to send a Content-Length header on responses. This feature causes spurious failures when used with those web servers, even though the responses are compliant with the spec. (In this case, an embedded, low-resource reporting server.)

Change History (2)

comment:1 Changed 6 years ago by DefaultCC Plugin

Cc: jknight added

comment:2 Changed 6 years ago by Jean-Paul Calderone

Resolution: wontfix
Status: newclosed

Thanks for your interest in improving Twisted.

Everything in the description is true. However, I don't see any problem to fix here.

If the HTTP server does not send Content-Length (which, indeed, is perfectly valid and allowed) (and also doesn't use something like chunked content encoding) then the HTTP client has no way to know if it received the entire response body. PotentialDataLoss is how Twisted's HTTP client API signals this information to the application. The application is free to disregard it if it chooses.

Note: See TracTickets for help on using tickets.