On Tue, Aug 3, 2021 at 4:45 AM Hans Henrik Bergan <divinit...@gmail.com>
wrote:

> fwiw i think no self-respecting codebase is depending on an ini-setting
> being correct for the ua in cases where the ua is actually important, so
> the breakage should be minimal.
>
>
In my mind, this is either an argument in favor of either NOT adding a new
INI setting (rather applying the existing user_agent setting to curl), or
doing nothing at all.  Code using curl already knows how to call the
precisely ONE line required to set a user agent, or more likely uses a
wrapper which simplifies cURL's archaic interface, in which case it's that
proxy which should be setting any default UA, not PHP.

And on the subject of PHP_INI_ALL/PERDIR/SYSTEM.  The answer is ALL.
PERDIR and SYSTEM exist either for technical limits (something gets
allocated and has to live across requests), or security limiters.  The
former certainly doesn't apply, and the latter wouldn't achieve anything
since the UA can always be set explicitly on any curl handle.   PHP_INI_ALL
is the only setting which makes sense if we add an additional configuration
(which I don't think we should).

-Sara

Reply via email to