Skip to content

Make SERVER_SOFTWARE compliant with RFC3875 #11093

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 3 commits into from
May 5, 2023
Merged

Make SERVER_SOFTWARE compliant with RFC3875 #11093

merged 3 commits into from
May 5, 2023

Conversation

cedric-anne
Copy link
Contributor

I work on an open source software that runs on PHP. We collect anonymized data to be able to do some statistics about execution environment of our software, and I figured out that the PHP internal server information was not collected as expected. This is due to the fact that we expect the SERVER_SOFTWARE to be compliant with RFC3875 (see below).

I am not sure this RFC should apply here, but as far as I know, all webservers I know are compliant with it.
Examples:

  • Apache/2.4.56 (Debian)
  • nginx/1.14.0
  • lighttpd/1.4.53
  • Microsoft-IIS/10.0
  • Microsoft-HTTPAPI/2.0

According to RFC3875

The SERVER_SOFTWARE meta-variable MUST be set to the name and version
of the information server software making the CGI request (and
running the gateway). It SHOULD be the same as the server
description reported to the client, if any.

  SERVER_SOFTWARE = 1*( product | comment )
  product         = token [ "/" product-version ]
  product-version = token
  comment         = "(" *( ctext | comment ) ")"
  ctext           = <any TEXT excluding "(" and ")">

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This seems reasonable to me. We should add an entry to the UPGRADING file to document the change accordingly.

@Girgias Girgias merged commit c02348c into php:master May 5, 2023
@cedric-anne cedric-anne deleted the patch-1 branch May 5, 2023 11:47
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.

3 participants