Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CURLOPT_FOLLOWLOCATION is ignored #40
Obviously this makes it impossible to directly interact with an entire category of HTTP responses (3xx) in any way with this library.
Was this done intentionally or is it simply an accidental addition? If the latter I can submit a PR to fix.
Note: I realise I'm possibly missing something - is there a way to set this setting at the request stage?
the Httplug interface (and PSR-18) define that the client must not follow redirects on its own. This client follows the standard, so that consumers of Httplug clients get a consistent interaction when swapping clients.
however, i agree that this is suprising because we allow setting the options. i think we should either respect the wish of a consumer to force this client to not behave according to spec, or validate the $options and throw an error when you try to enable redirections. not sure which is to be preferred... @php-http/owners wdyt?
Would go for option 1 here :
Respecting the specification is important for libraries exposing client, if you just use it then it does not matter. We should have the same approach than the PluginClient with the RedirectPlugin.