Server
The "Server" header field contains information about the software used by the origin server to handle the request, which is often used by clients to help identify the scope of reported interoperability problems, to work around or tailor requests to avoid particular server limitations, and for analytics regarding server or operating system use.
The header consists of one or more product names and versions, and comments. The equivalent header for clients making requests is the User-Agent header.
Writing responses (servers)
Origin servers should typically include a Server header unless specifically configured to omit it. HTTP libraries should include a default user agent that can be disabled, and offers the option to add a custom product name ahead of the library name.
Server: CERN/3.0 libwww/2.17
Comments can be provided inside a matched pair of parentheses, and matched pairs of parentheses can be nested:
Server: Webapp (http://example.com/about)
Currently, there is no way for intermediate nodes (proxies, caches, and gateways) to advertise their product names and versions, however their presence can be indicated with the Via header, and they can be specifically addressed with the Max-Forwards header.
Reading responses (clients)
Typically the Server header only serves as advertising for the server software.
In some cases, parsing the server header can be used to determine if clients need to deploy a workaround for a server bug; in this case, clients should blacklist exact headers so that upgrades to the server do not have to work around the client's workaround.
Overview table
- Name
- Server
- Description
- Names the server software name and version generating the origin response.
- Direction
- Response
- Specification
- HTTP/1.1 Semantics and Content ยง7.4.2. Server
Syntax
Server = product *( RWS ( product / comment ) )
product = token ["/" product-version]
product-version = token
comment = "(" *( ctext / quoted-pair / comment ) ")"
ctext = HTAB / SP / %x21-27 / %x2A-5B / %x5D-7E / obs-text
quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
This syntax is the same as the User-Agent header.
Example
Server: CERN/3.0 libwww/2.17