Skip to content

Commit

Permalink
Work around nasty bug in some http libraries that prevents POSTing.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrubinsk committed Jun 16, 2011
1 parent ca28ddc commit 2229568
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/Core/lib/Horde/Core/Factory/HttpClient.php
Expand Up @@ -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));
}

Expand Down

0 comments on commit 2229568

Please sign in to comment.