[Twisted-Python] HTTPClientFactory's deferred never finishing download on .vcf (vcard file) link

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sat Oct 10 15:15:42 MDT 2009


On 08:09 pm, listsin at integrateddevcorp.com wrote:
>
>On Oct 10, 2009, at 7:34 AM, Reza Lotun wrote:
>>>I'm not quite sure what you mean. Are you talking about web.client or
>>web.server?
>
>Web client.  I was having trouble with a particular URL which happened
>to be a download URL and wanted to see what the request and response
>objects looked like and was trying to find where I could examine
>them.  In the code I posted before, we were creating an
>HTTPClientFactory, then snagging the deferred.  I've simplified that
>by just using client.getPage().  The advantage of the
>HTTPClientFactory approach is that you can get at the response_headers.
>>There is a new twisted.web client implementation in the works which
>>will hopefully be ready for trunk in the near future, and which
>>should provide nearly the same functionality offered by urllib2 (or
>>more).
>
>Where might that be hiding?  I'd love to have something that does
>deferreds like Twisted and also implements all of urllib2.  I find the
>info() from urlopen() particularly helpful when debugging issues like
>this.

  http://twistedmatrix.com/trac/ticket/886
  http://twistedmatrix.com/trac/ticket/3987

As I understand the "info" method, it gives you access to the response 
headers.  The new API definitely exposes that information.

You'll notice that neither of these tickets is closed.  #3987 is 
presently up for review.  If you want to help out, you could take a look 
at the code and point out any problems you notice.

Jean-Paul




More information about the Twisted-Python mailing list