Skip to content

Retry: Add fallback support for when cURL multi is not available#18

Merged
willwashburn merged 9 commits intomasterfrom
add/curl-multi-fallback-support-2
May 25, 2019
Merged

Retry: Add fallback support for when cURL multi is not available#18
willwashburn merged 9 commits intomasterfrom
add/curl-multi-fallback-support-2

Conversation

@westonruter
Copy link
Copy Markdown
Collaborator

Starting a new PR from branch on origin repo. See #17.

Fixes #16.

It turns out that even when cURL is installed, the curl_multi_init() function may be disabled on some hosts who are seeking to guard against DDoS attacks. See ampproject/amp-wp#2183 (comment).

This PR modifies FasterImage::batch() to check if cURL multi is available, and if not, it falls back to doing plain curl_init() calls to obtain the images sequentially.

@westonruter westonruter force-pushed the add/curl-multi-fallback-support-2 branch from 85fd84e to f055d13 Compare May 23, 2019 22:02
@westonruter westonruter requested a review from willwashburn May 23, 2019 22:02
@coveralls
Copy link
Copy Markdown

coveralls commented May 23, 2019

Coverage Status

Coverage decreased (-0.3%) to 89.667% when pulling 55d15b0 on add/curl-multi-fallback-support-2 into 2a85079 on master.

@westonruter
Copy link
Copy Markdown
Collaborator Author

@willwashburn It works! 🎉

@willwashburn willwashburn merged commit 4d735c8 into master May 25, 2019
@willwashburn willwashburn deleted the add/curl-multi-fallback-support-2 branch May 25, 2019 14:26
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.

Fallback support when curl_multi_init() is not available

3 participants