Overwrite Expect Header to resolve 100 Continue for large payload

- Fixes #452
This commit is contained in:
Jay Patel
2015-12-07 15:27:30 -06:00
parent c40b391a5c
commit d1fd60dac6

View File

@@ -72,6 +72,9 @@ class RestHandler implements IPayPalHandler
(isset($options['path']) ? $options['path'] : '')
);
// Overwrite Expect Header to disable 100 Continue Issue
$httpConfig->addHeader("Expect", null);
if (!array_key_exists("User-Agent", $httpConfig->getHeaders())) {
$httpConfig->addHeader("User-Agent", PayPalUserAgent::getValue(PayPalConstants::SDK_NAME, PayPalConstants::SDK_VERSION));
}