From 2229568c692a08336b5c15f037e4b960223b70d8 Mon Sep 17 00:00:00 2001 From: Michael J Rubinsky Date: Thu, 16 Jun 2011 16:03:08 -0400 Subject: [PATCH] Work around nasty bug in some http libraries that prevents POSTing. Both Peclhttp and Curl libraries default to sending the Expect: 100-Continue header when Posting data over a certain size. This makes it impossible to POST to a server that does not support this header and correctly returns a 417 response code. The libraries do not attempt a fallback, nor do they make it clear that this is the default. --- framework/Core/lib/Horde/Core/Factory/HttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/Core/lib/Horde/Core/Factory/HttpClient.php b/framework/Core/lib/Horde/Core/Factory/HttpClient.php index 13d3f8fdc33..a676caf4766 100644 --- a/framework/Core/lib/Horde/Core/Factory/HttpClient.php +++ b/framework/Core/lib/Horde/Core/Factory/HttpClient.php @@ -28,7 +28,7 @@ public function create(array $opts = array()) } } } - + $opts['request.headers'] = array_merge($opts['request.headers'], array('Expect' => '')); return new Horde_Http_Client(array_merge($client_opts, $opts)); }