Browse Source

Fixed condition

PECL_OPENSSL
Ilia Alshanetsky 20 years ago
parent
commit
2ce982b433
  1. 8
      ext/curl/streams.c

8
ext/curl/streams.c

@ -350,17 +350,17 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
}
if (mr > 1) {
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, mr);
}
} else {
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, 20L);
}

Loading…
Cancel
Save