Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115625 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 42000 invoked from network); 3 Aug 2021 14:18:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Aug 2021 14:18:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A8E72180507 for ; Tue, 3 Aug 2021 07:47:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 3 Aug 2021 07:47:23 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id x8so26848021lfe.3 for ; Tue, 03 Aug 2021 07:47:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZdnEpSS6DGhwbHmudehBcqGmvsS4OE1kNsCF3dLc1L8=; b=UAawH+pJRs/rs+8E+VbuhvD92riPNsVFzcKGbSHTROqoqtIqYL/frUACstkfb/oQlR s3zf29oyK1qJel4lBjLXH+Rzqdul0K+a46aGCk/opgk7R3I0laX0rYSi4cuRVgGjWIRZ 0xZmct/h6eD9I5fi1Zribiw0xq+0qo3RUATKe9Q4Z4vcCAvVkDSJbtOxU+tgp3jqtiwe w0oCsVTzfuC8fDbKj0Gy6aZ8usx5hR63yKxN6dSleGutBhVDl9SFJosxrjvQIzcQkHWq 5i4+EB9E3KZKAAjG8OeUCgo+GoSC4Kmc2nEGuJ6wjVCUYpP0atscDzDuiKcoqRoAttvw AuAQ== X-Gm-Message-State: AOAM531fiQFU+cbbR7CWRZgz15nhX/cQngqI8Hym56MMEVMDoIU9w5Ct GVGe6We6Tc1k0qn3vZFUSs07Cb3+R9o4YtQOuPHFuQ== X-Google-Smtp-Source: ABdhPJxQX8dWw6JkqUlYUTMVKFlcILquFMdPFuBft54KIVoSmDJG9vnuSKxzMTYCT1Vrs5YhpKhZTQJ4DpRLxzzKjJ4= X-Received: by 2002:a05:6512:2035:: with SMTP id s21mr12994271lfs.451.1628002041413; Tue, 03 Aug 2021 07:47:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 3 Aug 2021 09:47:10 -0500 Message-ID: To: Hans Henrik Bergan Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000005f50b905c8a8c358" Subject: Re: [PHP-DEV] [RFC] Under Discussion: Default User-Agent for cURL From: pollita@php.net (Sara Golemon) --0000000000005f50b905c8a8c358 Content-Type: text/plain; charset="UTF-8" On Tue, Aug 3, 2021 at 4:45 AM Hans Henrik Bergan 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 --0000000000005f50b905c8a8c358--