X-Git-Url: https://git.distorted.org.uk/~mdw/hippotat/blobdiff_plain/216519e342072164533ae340141d585c638db8e2..916021af0447d61202fd909a722c28b08a4a13a3:/hippotat diff --git a/hippotat b/hippotat index 200cf3a..7130f91 100755 --- a/hippotat +++ b/hippotat @@ -43,7 +43,12 @@ class GeneralResponseConsumer(twisted.internet.protocol.Protocol): self._log(DBG.HTTP_CTRL, 'connectionMade') def connectionLostOK(self, reason): - return reason.check(twisted.web.client.ResponseDone) + return (reason.check(twisted.web.client.ResponseDone) or + reason.check(twisted.web.client.PotentialDataLoss)) + # twisted.web.client.PotentialDataLoss is an entirely daft + # exception. It will occur every time if the origin server does + # not provide a Content-Length. (hippotatd does, of course, but + # the HTTP transaction might be proxied.) class ResponseConsumer(GeneralResponseConsumer): def __init__(self, cl, req, resp):