Skip to content

[BrowserKit][HttpClient] [BrowserKit, HttpClient] Minor updates in the default user agents #50106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

javiereguiluz
Copy link
Member

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

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 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405

Mozilla/5.0 is the product and version
AppleWebKit/531.21.10 is a subproduct and its own version
In 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 the HttpClient, which is wrong (the version is 6.2, 6.3, etc.). The Amp 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.

@javiereguiluz javiereguiluz added this to the 6.3 milestone Apr 21, 2023
@carsonbot carsonbot changed the title [BrowserKit, HttpClient] Minor updates in the default user agents [BrowserKit][HttpClient] [BrowserKit, HttpClient] Minor updates in the default user agents Apr 21, 2023
@nicolas-grekas
Copy link
Member

Thank you @javiereguiluz.

@nicolas-grekas nicolas-grekas merged commit cc57a1c into symfony:6.3 Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants