Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Deal with continue header.

  • Loading branch information...
commit 5a4602a07f4f418ef0fa9cf919c8f92e58eb3894 1 parent 02f9ee0
@sbisbee authored
Showing with 21 additions and 1 deletion.
  1. +9 −0 CHANGELOG
  2. +12 −1 src/httpAdapters/SagCURLHTTPAdapter.php
View
9 CHANGELOG
@@ -1,6 +1,15 @@
Sag Changes
===========
+Version 0.7.1
+-------------
+
+Fixed Bugs
+
+ * The cURL HTTP library was choking on a HTTP/1.1 Continue header. Only some
+ installations were running into this problem, depending on their cURL
+ configuration and version.
+
Version 0.7.0
-------------
View
13 src/httpAdapters/SagCURLHTTPAdapter.php
@@ -90,7 +90,18 @@ public function procPacket($method, $url, $data = null, $headers = array()) {
$response->body = '';
// split headers and body
- list($headers, $response->body) = explode("\r\n\r\n", $chResponse);
+ list($continue, $headers, $response->body) = explode("\r\n\r\n", $chResponse);
+
+ /*
+ * It doesn't always happen, but it seems that we will sometimes get a
+ * Continue header that will screw parsing up.
+ */
+ if(!$response->body) {
+ $response->body = $headers;
+ $headers = $continue;
+ }
+
+ unset($continue);
// split up the headers
$headers = explode("\r\n", $headers);
Please sign in to comment.
Something went wrong with that request. Please try again.