Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CurlDownloader.php #4

Merged
merged 1 commit into from Apr 8, 2019
Merged

Update CurlDownloader.php #4

merged 1 commit into from Apr 8, 2019

Conversation

liubang
Copy link
Contributor

@liubang liubang commented Feb 26, 2018

使用http proxy 返回的原始数据为

HTTP/1.1 200 OK
Date: Monday, 26-Feb-18 12:01:58 CST
Keep-Alive: timeout=38
Content-Length: 0

HTTP/1.1 200 OK
Date: Mon, 26 Feb 2018 04:01:59 GMT
Server: Apache/2.4.25 (Debian)
Last-Modified: Sun, 31 Dec 2017 04:18:46 GMT
ETag: "6c5-5619b297052f6"
Accept-Ranges: bytes
Content-Length: 1733
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" ?>
.......

在http proxy模式下,会导致phpbrew ext known $ext 和 phpbrew ext install $ext $version报错

使用http proxy 返回的原始数据为

HTTP/1.1 200 OK
Date: Monday, 26-Feb-18 12:01:58 CST
Keep-Alive: timeout=38
Content-Length: 0

HTTP/1.1 200 OK
Date: Mon, 26 Feb 2018 04:01:59 GMT
Server: Apache/2.4.25 (Debian)
Last-Modified: Sun, 31 Dec 2017 04:18:46 GMT
ETag: "6c5-5619b297052f6"
Accept-Ranges: bytes
Content-Length: 1733
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" ?>
.......

在http proxy模式下,会导致phpbrew ext known $ext 和 phpbrew ext install $ext $version报错
@c9s c9s merged commit a967106 into c9s:master Apr 8, 2019
@@ -165,7 +165,7 @@ public function request($url, $params = array(), $options = array() )

// When using HTTP TUNNEL, there is an extra response line before the
// original response line, we need to separate them if it matches "Connection established"
if (preg_match('#HTTP/1.[0-1] 200 Connection established#i', $data)) {
if (preg_match('#HTTP/1.[0-1] 200#i', $data)) {
Copy link
Collaborator

@morozov morozov Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c9s are you sure this is the right change? It contradicts the comment and breaks the PhpBrew build after an update to the latest version of the library. See phpbrew/phpbrew#1038, build #570616613.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants