Skip to content

Instantly share code, notes, and snippets.

@mrpunkin
Last active December 21, 2016 14:27
Show Gist options
  • Select an option

  • Save mrpunkin/5324955 to your computer and use it in GitHub Desktop.

Select an option

Save mrpunkin/5324955 to your computer and use it in GitHub Desktop.
Fix to re-process header if initial header is 100 Continue in Amazon MWS Fulfillment Outbound Shipment PHP client library
<?php
...
//// Starting @ line 635 of FBAOutboundServiceMWS/Client.php
list($other, $responseBody) = explode("\r\n\r\n", $response, 2);
$other = preg_split("/\r\n|\n|\r/", $other);
list($protocol, $code, $text) = explode(' ', trim(array_shift($other)), 3);
// Re-check for new header after continue header.
if((int)$code == 100){
list($other, $responseBody) = explode("\r\n\r\n", $responseBody, 2);
$other = preg_split("/\r\n|\n|\r/", $other);
list($protocol, $code, $text) = explode(' ', trim(array_shift($other)), 3);
}
...
?>
@gsouf
Copy link

gsouf commented Dec 21, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment