Skip to main content

2.2.5. Request Target

2.2.5. Request Target

The @request-target derived component refers to the full request target of the HTTP request message, as defined in [HTTP], Section 7.1. The component value of the request target can take different forms, depending on the type of request, as described below.

For HTTP/1.1, the component value is equivalent to the request target portion of the request line. However, this value is more difficult to reliably construct in other versions of HTTP. Therefore, it is NOT RECOMMENDED that this component be used when versions of HTTP other than 1.1 might be in use.

The origin form value is a combination of the absolute path and query components of the request URL.

For example, the following request message:

POST /path?param=value HTTP/1.1 Host: www.example.com

would result in the following @request-target component value:

/path?param=value

and the following signature base line:

"@request-target": /path?param=value

The following request to an HTTP proxy with the absolute-form value, containing the fully qualified target URI:

GET https://www.example.com/path?param=value HTTP/1.1

would result in the following @request-target component value:

https://www.example.com/path?param=value

and the following signature base line:

"@request-target": https://www.example.com/path?param=value

The following CONNECT request with an authority-form value, containing the host and port of the target:

CONNECT www.example.com:80 HTTP/1.1 Host: www.example.com

would result in the following @request-target component value:

www.example.com:80

and the following signature base line:

"@request-target": www.example.com:80

The following OPTIONS request message with the asterisk-form value, containing a single asterisk (*) character:

OPTIONS * HTTP/1.1 Host: www.example.com

would result in the following @request-target component value:

and the following signature base line:

"@request-target": *