cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with forward proxy script v3.2

andrew_hui
Nimbostratus
Nimbostratus

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 1

andrew_hui
Nimbostratus
Nimbostratus
A bit of debugging and I think I've found the problem. On line 48, set new_path [findstr [HTTP::uri] $prefix [string length $prefix] ] ... returns nothing because there's nothing after the uri, so $new_path is empty. Then on line 53, HTTP::uri goes empty.