This repository has been archived by the owner on Nov 26, 2017. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, would it be ok to just change this to:
If we can support it in the other transports it won't be hard to support it with a generic option. It would be good to document the options that are available, probably in the this class constructor Docblock.
Does that get you out of trouble?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will solve my problem, I just thought it would be better not to follow redirects automatically. In this case it would be a good idea to set the CURLOPT_MAXREDIRS in order to specify the maximum number of redirects to follow, avoiding infinite loops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using a curl specific option, why not use a generic name like the stream options (follow_location or max_redirects) and then at the transport level map them onto their respective options. This will automatically work for stream as it passes in the HTTP options straight through and cURL will require some level of custom handling either.
Safe mode is gone in PHP 5.4 as well.