rfc:curl_user_agent
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:curl_user_agent [2021/06/25 13:53] – paresy | rfc:curl_user_agent [2021/07/08 09:55] (current) – paresy | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Your Title Here ====== | + | ====== PHP RFC: Default User-Agent for cURL====== |
* Version: 1.0 | * Version: 1.0 | ||
* Date: 2021-06-25 | * Date: 2021-06-25 | ||
* Author: Michael Maroszek (maroszek@gmx.net) | * Author: Michael Maroszek (maroszek@gmx.net) | ||
- | * Proposed Version: PHP 8.1 | + | * Proposed Version: PHP 8.2 |
* Status: Under Discussion | * Status: Under Discussion | ||
* First Published at: http:// | * First Published at: http:// | ||
Line 9: | Line 9: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | PHP had a user_agent php.ini entry for decades, which would be used as a default value. But it would only be considered for stream based operations like file_get_contents. This RFC proposes a new user_agent php.ini | + | PHP has a user_agent php.ini entry for decades, which can be set as a default value. But it is considered for stream based operations like file_get_contents. This RFC proposes a new curl.user_agent php.ini |
===== Proposal ===== | ===== Proposal ===== | ||
Line 23: | Line 23: | ||
===== RFC Impact ===== | ===== RFC Impact ===== | ||
+ | |||
==== To SAPIs ==== | ==== To SAPIs ==== | ||
- | This feature is especially useful for SAPI usage, as it allows a default header for all HTTP requests (independently if stream based or cURL based) that will allow the remote side to detect the application. At the moment you need to have a workflow or a wrapper that will ensure that the User-Agent is set. | + | This feature is especially useful for SAPI usage, as it allows a default header for all HTTP requests (independently if stream based or cURL based) that will allow the remote side to detect the application. At the moment you need to have a workflow or a wrapper that will ensure that the User-Agent is set for all streams and cURL requests. In our use-case the user is also allowed to create PHP scripts by himself. In this situation the user will most probably not set the User-Agent at all, but rely on the defaults. |
==== To Existing Extensions ==== | ==== To Existing Extensions ==== | ||
Line 39: | Line 40: | ||
===== Open Issues ===== | ===== Open Issues ===== | ||
- | No issues left. | + | Discussion if the ini visibility should be PHP_INI_ALL or PHP_INI_SYSTEM |
+ | https:// | ||
===== Unaffected PHP Functionality ===== | ===== Unaffected PHP Functionality ===== | ||
Line 48: | Line 50: | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | At the moment the php.ini option is placed | + | At the moment the php.ini option is proposed |
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
- | Links to any external patches and tests go here. | + | Tests are included in the following PR. |
- | + | ||
- | If there is no patch, make it clear who will create a patch, or whether a volunteer to help with implementation is needed. | + | |
- | + | ||
- | Make it clear if the patch is intended to be the final patch, or is just a prototype. | + | |
- | + | ||
- | For changes affecting the core language, you should also provide a patch for the language specification. | + | |
===== Implementation ===== | ===== Implementation ===== |
rfc/curl_user_agent.1624629206.txt.gz · Last modified: 2021/06/25 13:53 by paresy