Applies To:

Show Versions Show Versions

sol9952: The HTTP::path iRule command may return more information than expected
Known IssueKnown Issue

Original Publication Date: 04/14/2009
Updated Date: 07/27/2016

Known Issue

The HTTP::path iRule command is intended to return only the path of the HTTP request. However, if the HTTP request specifies an absolute URI for the request URI, the HTTP::path iRule command returns the entire URI, which includes not only the path but also any protocol scheme, host name and port included in the request URI value.

The first line of an HTTP request from a client to a server is referred to as the request line. The request line begins with a method token, followed by the request URI and the protocol version. A typical HTTP request line appears similar to the following example:

GET /dir1/dir2/file.ext HTTP/1.1

Note: In this example, the method token is GET, the resource URI is /dir2/dir2/file.ext, and the protocol version is HTTP/1.1.

However, some clients (most notably proxies) may send an HTTP request for the same resource by specifying the absolute URI in the request, which appears similar to the following example:


Note: In this example, the method token is GET, the resource URI is, and the protocol version is HTTP/1.1.

The HTTP::path iRule command should return the following path value for both requests:


However, since the HTTP::path command actually returns the value of the request URI, the entire absolute URI is returned for the request in the second example, which specifies the following absolute URI in the request URI:

Note: Both requests in the example above conform to the HTTP request specification as defined in Section 5 of Internet Engineering Task Force (RFC 2616).

Note: For more information about the HTTP::path iRule command, refer to HTTP:path on the F5 DevCentral website. A separate DevCentral login is required to access this content. You will be redirected to authenticate or register if necessary.



F5 Product Development has assigned ID 222409 to this issue, and has confirmed that this issue exists in the products listed in the Applies To box. For information about releases or hotfixes that resolve this issue, refer to the following table:

Type of FixVersions FixedRelated Articles


You can work around this issue by parsing the path element from the return value for the HTTP::path command. To do so, use the following iRule wherever HTTP::path is called:

log local0. "Path: [URI::path [HTTP::path]]"

Was this resource helpful in solving your issue?

NOTE: Please do not provide personal information.

Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)