[bug] add http request timeout
authordrebs <drebs@leap.se>
Wed, 8 Jul 2015 22:15:56 +0000 (19:15 -0300)
committerRuben Pollan <meskio@sindominio.net>
Wed, 22 Jul 2015 14:04:22 +0000 (10:04 -0400)
commit34f6b07e08540fd9b2ec473d1e4e5a15be4feacc
tree63eb157e711eee447bbd96adb17f7139dbedc48a
parent46870f1e26ef159bf6fe4744aba3b00a5e81cc3b
[bug] add http request timeout

The connectTimeout parameter of twisted.web.client.Agent only acts on the
connection setup, and the Agent will wait forever for incoming data after the
connection has been established.

This commit adds a timeout for the connection, and will cancel the deferred if
the result has not been received after a certain number of seconds.
changes/bug_7234_add-http-request-timeout [new file with mode: 0644]
src/leap/common/http.py