praekelt/vumi — Issue #144: Handle PotentialDataLoss exception in HTTP requests
Author: jerith
Created: 2012-01-23 12:00:51+00:00
State: open

Twisted's HTTP client raises a `PotentialDataLoss` exception whenever it receives a response that has no `Content-Length` header. In the absence of a header, there's no generic way to determine whether the request body is truncated. Since this exception only indicates the possibility of a problem and it can't easily be handled outside our `vumi.utils.{http_request,full_http_request}` convenience wrappers, I propose catching and ignoring it. Applications that care can check the header themselves if they want.