[BrowserKit][HttpClient] [BrowserKit, HttpClient] Minor updates in the default user agents #50106
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.
After merging #50053 I realized that some of my changes were not really needed.
According to the spec, the user agent "consists of one or more product identifiers, each followed by zero or more comments"
For example this user agent:
Mozilla/5.0
is the product and versionAppleWebKit/531.21.10
is a subproduct and its own versionIn both cases the version is optional.
So, our user agent
Symfony BrowserKit
is correct:Symfony
is the product, without version (completely legal)BrowserKit
is the subproduct, and omits its version (legal too)The real issue was with user agents like
Symfony HttpClient/Amp
, because/Amp
would be interpreted as the version of theHttpClient
, which is wrong (the version is6.2
,6.3
, etc.). TheAmp
text is a detail about a product, so it's common to wrap it in parenthesis.So, sorry for the noise and I think this time this is fully correct. Thanks.