1
0
Fork 0

Workaround when your proxy server fails request with enabled http_proxy_request_fulluri HTTP parameter

pull/1828/head
Alexander Loutsenko 2013-04-24 15:14:39 +04:00 committed by Jordi Boggiano
parent 028d95db63
commit b7e41de607
1 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,13 @@ final class StreamContextFactory
$options['http']['proxy'] = $proxyURL;
$options['http']['request_fulluri'] = true;
if ( strtolower( getenv('http_proxy_request_fulluri') ) == 'false' ||
strtolower( getenv('HTTP_PROXY_REQUEST_FULLURI') ) == 'false'
)
{
$options['http']['request_fulluri'] = false;
}
if (isset($proxy['user'])) {
$auth = $proxy['user'];
if (isset($proxy['pass'])) {