Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Workaround Curl bug where Proxy headers are not included in header_size #48

Merged
merged 1 commit into from May 16, 2014

Conversation

Mousius
Copy link
Contributor

@Mousius Mousius commented May 9, 2014

Versions of Curl prior to 7.30.0 do not properly account for additional headers injected via proxies when calculating header_size. This is a quick workaround based on:
googleapis/google-api-php-client#117

This detects the commonly added proxy header and removes the length so that it returns correctly. It has no effect if the curl version is higher than 7.30.0.

Ref:
googleapis/google-api-php-client#117
https://bugs.php.net/bug.php?id=63894
http://curl.haxx.se/mail/lib-2013-04/0189.html

@gfosco
Copy link
Contributor

gfosco commented May 15, 2014

Couple things:
Please change the function curlProxyBug to needsCurlProxyFix and make it a private static function.
Please rebase since changes have caused conflicts.

@Mousius
Copy link
Contributor Author

Mousius commented May 16, 2014

Thanks for your feedback, I have updated my branch.

gfosco pushed a commit that referenced this pull request May 16, 2014
Workaround Curl bug where Proxy headers are not included in header_size
@gfosco gfosco merged commit 595512b into facebookarchive:master May 16, 2014
@gfosco
Copy link
Contributor

gfosco commented May 16, 2014

Thank you.

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

Successfully merging this pull request may close these issues.

None yet

2 participants