Forum Discussion
Magnum_IP
Sep 29, 2011Nimbostratus
HTTP::uri returns full URL
I have had reason to log HTTP::uri while troubleshooting an error on a new Virtual Server. When I log HTTP::uri I see the full URL including protocol, for example,
http://www.domain.com/dir/file.htm
I was anticipating only seeing
/dir/file.htm
Can anybody explain what is happening here? This goes against everything I thought I understood about HTTP::uri.
Thanks
fergu5
- hooleylistCirrostratusHi Fergu,
- Magnum_IPNimbostratus
Hey Hoolio,
Firstly, can I just say that my friend LyonsG and I are continually impresses by your seemingly endless knowledge and your everpresence on DevCentral - do you ever sleep?;-P Thanks for taking the time to help ;-)
nails it;-D
- hooleylistCirrostratusThere's an RFE for this, BZ222409. You could open a case with F5 Support and ask them to attach it to the RFE.
when HTTP_REQUEST { Check for an absolute URI if {not ([HTTP::uri] starts_with "/")}{ if {[scan $abs_uri {%[^/]//%[^/]%s} proto host uri] == 3}{ Log the URI to a local URI log local0. "\$proto: $proto, \$host: $host, \$uri: $uri" } } }
- spark_86682Historic F5 AccountThat RFE is for changing HTTP::path, not HTTP::uri. You could open up a new RFE for adding a new command to get only the relative part of the URI, and I would encourage you to do so.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects