[squid-users] I thought transparent proxying wasn't working. No, it's something different...

From: Denis Vlasenko <vda@dont-contact.us>
Date: Wed, 29 Jan 2003 12:07:52 +0200

I set up a transparent proxy. Testing:

# http_proxy=172.16.42.127:3128 wget -c http://www.ilyichevsk.net
        access.log:
1043831883.103 70 172.16.42.177 TCP_HIT/200 19955 GET http://www.ilyichevsk.net/ ...

so this works.

# http_proxy= wget -c http://www.ilyichevsk.net
        access.log:
1043831679.469 25 172.16.42.177 NONE/400 1451 GET / - NONE/- text/html [] [HTTP/1.0 400 Bad Request...

This does not.

Let's see the details:

# http_proxy=172.16.42.127:3128 wget -c http://www.ilyichevsk.net
        cache.log:
2003/01/29 11:18:03| parseHttpRequest: Method is 'GET'
2003/01/29 11:18:03| parseHttpRequest: URI is 'http://www.ilyichevsk.net/'
2003/01/29 11:18:03| parseHttpRequest: req_hdr = {User-Agent: Wget/1.7
Host: www.ilyichevsk.net
Accept: */*

}
2003/01/29 11:18:03| parseHttpRequest: end = {}
2003/01/29 11:18:03| parseHttpRequest: prefix_sz = 104, req_line_sz = 41
2003/01/29 11:18:03| parseHttpRequest: Request Header is
User-Agent: Wget/1.7
Host: www.ilyichevsk.net
Accept: */*

2003/01/29 11:18:03| parseHttpRequest: Complete request received
2003/01/29 11:18:03| conn->in.offset = 0
2003/01/29 11:18:03| clientSetKeepaliveFlag: http_ver = 1.0
2003/01/29 11:18:03| clientSetKeepaliveFlag: method = GET
...
...

# http_proxy= wget -c http://www.ilyichevsk.net
        cache.log:
2003/01/29 11:14:39| parseHttpRequest: Method is 'GET'
2003/01/29 11:14:39| parseHttpRequest: URI is '/'
2003/01/29 11:14:39| parseHttpRequest: req_hdr = {User-Agent: Wget/1.7
Host: www.ilyichevsk.net
Accept: */*
Connection: Keep-Alive

}
2003/01/29 11:14:39| httpAccept: FD 13: accepted
2003/01/29 11:14:39| clientReadRequest: FD 13: reading request...
2003/01/29 11:14:39| parseHttpRequest: Method is 'GET'
2003/01/29 11:14:39| parseHttpRequest: URI is '/'
2003/01/29 11:14:39| parseHttpRequest: req_hdr = {User-Agent: Wget/1.7
Host: www.ilyichevsk.net
Accept: */*
Connection: Keep-Alive

}
2003/01/29 11:14:39| parseHttpRequest: end = {}
2003/01/29 11:14:39| parseHttpRequest: prefix_sz = 103, req_line_sz = 16
2003/01/29 11:14:39| parseHttpRequest: Request Header is
User-Agent: Wget/1.7
Host: www.ilyichevsk.net
Accept: */*
Connection: Keep-Alive

2003/01/29 11:14:39| parseHttpRequest: Complete request received
2003/01/29 11:14:39| conn->in.offset = 0
2003/01/29 11:14:39| Invalid URL: /
...
...

As you can see, wget sends different HTTP requests with and without
http_proxy environment variable. Seems like squid dislike this request:
GET /
User-Agent: Wget/1.7
Host: www.ilyichevsk.net
Accept: */*
Connection: Keep-Alive

Why???!!

P.S. I verified that with telnet too.

--
vda
Received on Wed Jan 29 2003 - 03:15:32 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:12:55 MST