aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-03 00:34:56 -0700
committerFriendika <info@friendika.com>2011-07-03 00:34:56 -0700
commitcffc4ef14d5ce10411f9e8f01638e9ba523f3c81 (patch)
tree5790d0b819ce59e6dd027003b53c35ce12c1fe58 /boot.php
parentab7f209fe3986ad751bd3a8ec2e155fcf1f9f130 (diff)
downloadvolse-hubzilla-cffc4ef14d5ce10411f9e8f01638e9ba523f3c81.tar.gz
volse-hubzilla-cffc4ef14d5ce10411f9e8f01638e9ba523f3c81.tar.bz2
volse-hubzilla-cffc4ef14d5ce10411f9e8f01638e9ba523f3c81.zip
alter test for http continuation header. Use regex, ignore length.
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 5ff8b50af..35adae330 100644
--- a/boot.php
+++ b/boot.php
@@ -704,7 +704,7 @@ function fetch_url($url,$binary = false, &$redirects = 0) {
$http_code = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
$header = substr($s,0,strpos($s,"\r\n\r\n"));
- if(stristr($header,'100') && (strlen($header) < 30)) {
+ if(preg_match('/HTTP\/.+? 100/',$header)) {
// 100 Continue has two headers, get the real one
$s = substr($s,strlen($header)+4);
$header = substr($s,0,strpos($s,"\r\n\r\n"));
@@ -777,7 +777,7 @@ function post_url($url,$params, $headers = null, &$redirects = 0) {
$http_code = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
$header = substr($s,0,strpos($s,"\r\n\r\n"));
- if(stristr($header,'100') && (strlen($header) < 30)) {
+ if(preg_match('/HTTP\/.+? 100/',$header)) {
// 100 Continue has two headers, get the real one
$s = substr($s,strlen($header)+4);
$header = substr($s,0,strpos($s,"\r\n\r\n"));