Skip to content

Commit bc4bd89

Browse files
committed
update
1 parent 25b7aa4 commit bc4bd89

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/Curl.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,15 @@ public static function call($method, $url, $data = '', $headers = array(), $opti
7575
unset($_SESSION['curl_cookies']);
7676
}
7777

78-
list($head, $body) = explode("\r\n\r\n", $result, 2);
78+
if (strpos($result, "\r\n\r\n") === false) {
79+
list($head, $body) = array($result, '');
80+
} else {
81+
list($head, $body) = explode("\r\n\r\n", $result, 2);
82+
while (preg_match('|\s+100\s+Continue|', substr($head, 0, strpos($head, "\r\n")))) {
83+
list($head, $body) = explode("\r\n\r\n", $body, 2);
84+
}
85+
}
86+
7987
$result = array('status' => $status);
8088
$result['headers'] = array();
8189
$result['data'] = $body;

0 commit comments

Comments
 (0)