Forum Discussion
Problem with forward proxy script v3.2
I'm using the HTTP forward proxy script v3.2, but noticing some problems while testing.
If I do a telnet to the VIP with the iRule applied, and request a URL without the slash on the end, I get an error. It's fine if I put a slash on the end, but I can't guarantee that someone using my proxy will put the / on the end, eg
Escape character is '^]'.
GET http://www.google.com HTTP/1.1
Host: www.google.com
HTTP/1.0 403 Forbidden Content-Length: 1201 Content-Type: text/html; charset=UTF-8 Date: Thu, 16 Jan 2014 01:11:02 GMT Server: GFE/2.0 Alternate-Protocol: 80:quic Via: F5ProxyiRule
We're sorry...... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now
If I do the same request with the / on the end, the response is fine. eg
Escape character is '^]'.
GET http://www.google.com/ HTTP/1.1
Host: www.google.com
HTTP/1.1 302 Found Cache-Control: private Content-Type: text/html; charset=UTF-8 Location: http://www.google.com.au/?gfe_rd=cr&ei=uDLXUtmeBseN8QelvoHoDA Content-Length: 262 Date: Thu, 16 Jan 2014 01:15:36 GMT Server: GFE/2.0 Alternate-Protocol: 80:quic Via: F5ProxyiRule
It almost seems as if the iRule cannot parse the URI correctly, and does a GET on "http://www.google.com HTTP/1.1" instead of www.google.com along with the HTTP version. Any advice appreciated.
1 Reply
- Deb_Allen_18Historic F5 AccountHi Eli -
- elito_26780
Nimbostratus
No luck. - Deb_Allen_18Historic F5 AccountAssuming that there are several requests in a single Keep-Alive connection (rather than in a single packet), you could disable the HTTP_REQUEST event after the first request is seen, then that pool will be used for the life of the connection:
when HTTP_REQUEST { if { [HTTP::uri] contains ".gif"} { pool servers2 } else { pool servers1 } event disable }
- elito_26780
Nimbostratus
Thanks! Cool! That what i was looking for. Just missed the "event" command in reference guide. - Deb_Allen_18Historic F5 AccountNo problem!
Recent Discussions
Related Content
* 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