Forum Discussion
Steve_Sutton_87
Nimbostratus
May 04, 2005why is log statement in else clause executing?
Hi,
I have the following rule:
if (http_uri == "/") {
log local0.info "test09si: redirected incomplete URI"
redirect to "https://%h/Test01_09"
...
Steve_Sutton_87
Nimbostratus
May 05, 2005I'd log the http_uri value if I could - but the log command doesn't appear to expand the http_uri variable? The doc says the log command will do variable expansion as in the header insert pool attribute. Looking at that, there are variables for client address and port, server address and port, link_qos and ip_qos - nothing that would provide either the path, or host, or even the entire URL.
And indeed there is redirection occurring once one hits the Tomcat server - the final URL is https://test09si.blueroads.com/Test01_09/Login.do - the "/Test09" tells Tomcat/Jboss which context to use, and code in the app server does the rest of the work.
I added a log statement to the else if clause, and sent my browser to https://test09si.blueroads.com, which eventually landed me on the above page. Here's what was in the log:
May 5 10:00:37 cerebus kernel: RULE test09si-URICheck-Pool_test01 - test09si: redirected incomplete URI http_uri
May 5 10:00:37 cerebus kernel: RULE test09si-URICheck-Pool_test01 - test09si: found URI path http_uri
May 5 10:00:37 cerebus last message repeated 13 times
May 5 10:00:42 cerebus kernel: RULE test09si-URICheck-Pool_test01 - test09si: redirected for bad path http_uri
Note that "http_uri" is treated simply as a string in the log command. There are a number of images on the page, which presumably accounts for the 14 times through the else if clause. But in looking at the source for the page, there are no references to any images, etc. that are outside of test09si.blueroads.com/Test01_09. There are a couple of href's that are links to other sites, but they won't activate unless one clicks on the links.
So, I'm at a loss here. Guess I may have to crank up tcpdump to see what my browser is sending through.
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
