Skip to content

Add missing $_SERVER values #14

Closed
Closed
@kentr

Description

@kentr

Problem/Motivation

Per the PHP docs, some standard $_SERVER values are missing.

There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here. That said, a large number of these variables are accounted for in the » CGI/1.1 specification, so you should be able to expect those.

The CGI spec referenced lists these:

  • 4.1.1. AUTH_TYPE
  • 4.1.2. CONTENT_LENGTH
  • 4.1.3. CONTENT_TYPE
  • 4.1.4. GATEWAY_INTERFACE
  • 4.1.5. PATH_INFO
  • 4.1.6. PATH_TRANSLATED
  • 4.1.7. QUERY_STRING
  • 4.1.8. REMOTE_ADDR
  • 4.1.9. REMOTE_HOST
  • 4.1.10. REMOTE_IDENT
  • 4.1.11. REMOTE_USER
  • 4.1.12. REQUEST_METHOD
  • 4.1.13. SCRIPT_NAME
  • 4.1.14. SERVER_NAME
  • 4.1.15. SERVER_PORT
  • 4.1.16. SERVER_PROTOCOL
  • 4.1.17. SERVER_SOFTWARE

Proposed resolution

Set $request->server parameters correctly, such as in HttpKernel::mapRequest() where the other server parameters are set.

API changes

The interface shouldn't change, but the values available through $request->server->get() should more accurately reflect a standard PHP server environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions