Opened 11 years ago

Closed 11 years ago

#5013 defect closed fixed (fixed)

HTTP11ClientProtocol fails with RuntimeError on connectionLost if response is received before transmitting request

Reported by: Drew Smathers Owned by: Tristan Seligmann
Priority: normal Milestone:
Component: web Keywords: httpclient
Cc: jknight, Tristan Seligmann Branch: branches/response-before-request-finished-5013
branch-diff, diff-cov, branch-cov, buildbot
Author: mithrandi


Some http servers (S3 for) might send a response before transmitting the request completes. This causes a RuntimeError down stream when the connection is lost:

exceptions.RuntimeError: <twisted.web._newclient.HTTP11ClientProtocol instance at 0x1d54c68> has no connectionLost method in state TRANSMITTING_AFTER_RECEIVING_RESPONSE

There should be a corresponding _connectionLost_TRANSMITTING_AFTER_RECEIVING_RESPONSE method on HTTP11ClientProtocol to handle this case.

Attachments (1)

5013.patch (2.1 KB) - added by Drew Smathers 11 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by DefaultCC Plugin

Cc: jknight added

comment:2 Changed 11 years ago by Drew Smathers

Owner: set to Drew Smathers
Status: newassigned

Changed 11 years ago by Drew Smathers

Attachment: 5013.patch added

comment:3 Changed 11 years ago by Drew Smathers

Keywords: review added
Owner: Drew Smathers deleted
Status: assignednew

comment:4 Changed 11 years ago by Tristan Seligmann

Cc: Tristan Seligmann added
Keywords: review removed
Owner: set to Tristan Seligmann

Looks good, but this needs a news file. I assume djroofy doesn't have commit privs so I'm going to add that myself and merge it.

comment:5 Changed 11 years ago by Tristan Seligmann

Author: mithrandi
Branch: branches/response-before-request-finished-5013

(In [31528]) Branching to 'response-before-request-finished-5013'

comment:6 Changed 11 years ago by Tristan Seligmann

Resolution: fixed
Status: newclosed

Merged in [31535] but SVN ate my commit message somehow :(

Note: See TracTickets for help on using tickets.