Skip to content

Commit

Permalink
Merge pull request #118 from hirak/httpoxy
Browse files Browse the repository at this point in the history
Fix httpoxy
  • Loading branch information
hirak authored Jul 21, 2016
2 parents 250e5fc + 117f68d commit 3a9facb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/BaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ protected function getProxy($url)
}
}

// @see https://httpoxy.org/
if (!defined('PHP_SAPI') || PHP_SAPI !== 'cli') {
return null;
}

foreach (array('https', 'http') as $scheme) {
if ($this->scheme === $scheme) {
$label = $scheme . '_proxy';
Expand Down

0 comments on commit 3a9facb

Please sign in to comment.