uni
Feb 20, 2008Altostratus
Different behaviour with HTTP::path and URI::path
I have noticed a difference in behaviour between the HTTP::path and URI::path commands.
I expected that [HTTP::path] would return the same result as [URI::path [HTTP::uri]], but HTTP::path includes the basename, whereas URI::path does not.
Given my rule below
rule test-rule {
when HTTP_REQUEST {
HTTP::respond 200 content "HTTP path [HTTP::path]\n URI path [URI::path [HTTP::uri]]\n\n"
}
}
if I call it's virtual:curl http://192.168.1.2/path/morepath/base.htm?query
I get the following response: HTTP path /path/morepath/base.htm
URI path /path/morepath/
Do I misunderstand something here, or is this a bug? I'm running 9.3.0, so maybe this issue has been fixed.