summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-10 17:04:51 -0800
committerBrion Vibber <brion@pobox.com>2010-03-10 17:04:51 -0800
commitc6f09306b1c72296db8b55500a5d6a2ea8cd5dd2 (patch)
treed623c7b98c2d99ddac3116b8114b90c1db4e18c6 /lib
parent2a426f24c0599710ef170b01f7f7124b7166e12e (diff)
parent66518df4356ea878bfd8693191f0354caebfb549 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib')
-rw-r--r--lib/httpclient.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/httpclient.php b/lib/httpclient.php
index 4c3af8d7d..64a51353c 100644
--- a/lib/httpclient.php
+++ b/lib/httpclient.php
@@ -120,6 +120,16 @@ class HTTPClient extends HTTP_Request2
{
$this->config['max_redirs'] = 10;
$this->config['follow_redirects'] = true;
+
+ // We've had some issues with keepalive breaking with
+ // HEAD requests, such as to youtube which seems to be
+ // emitting chunked encoding info for an empty body
+ // instead of not emitting anything. This may be a
+ // bug on YouTube's end, but the upstream libray
+ // ought to be investigated to see if we can handle
+ // it gracefully in that case as well.
+ $this->config['protocol_version'] = '1.0';
+
parent::__construct($url, $method, $config);
$this->setHeader('User-Agent', $this->userAgent());
}