[squid-users] Unparsable headers? Squid as reverse-proxy.

From: David Robillard <drobilla@dont-contact.us>
Date: Fri, 22 Mar 2002 14:44:32 -0500

Hello squid-users,

I am trying to setup squid as a reverse-proxy for an application
called compositor which was developped in-house as an apache module.
Compositor generates and sends images to client web browsers.

The idea is to cache the images in order to lower to load on the
compositor server.

I have successfully configured squid as a reverse-proxy for static images.
But unfortunately, I can't seem to make it happen for the compositor server.

From the store.log file, it seems that squid is unable to parse the HTTP
headers sent from the compositor-server. Why is that? Could this prevent
the image to be cached to disk?

If someone could help me in this issue, it would be really appreciated.

Here's the debug info:

# squid version:

Starting Squid Cache version 2.4.STABLE6 for i686-pc-linux-gnu

# Packets are send back and forth between these machines:

client <--> web server <--> squid <--> compositor-server

# squid access.log when a client requests an image from the compositor server:

1016824111.928 1719 clientIP TCP_MISS/200 27489 GET http://compositor-server:8080/compositor? - DIRECT/compositor-server image/jpeg
1016824112.966 3644 clientIP TCP_MISS/200 27489 GET http://compositor-server:8080/compositor? - DIRECT/compositor-server image/jpeg
1016824114.429 1185 clientIP TCP_MISS/200 27489 GET http://compositor-server:8080/compositor? - DIRECT/compositor-server image/jpeg

# squid store.log when a client requests an image from the compositor server:

1016824117.209 RELEASE -1 FFFFFFFF 640CD3E55077E719FEA0DE746C4C0FE9 200 1016824164 -1 -1 image/jpeg 27296/27296 GET http://compositor-server:8080/compositor?
1016824119.558 RELEASE -1 FFFFFFFF 687FB73FF685F1A7AA7D02C4E58FCECA 200 1016824167 -1 -1 image/jpeg 27296/27296 GET http://compositor-server:8080/compositor?
1016824120.546 RELEASE -1 FFFFFFFF CE460C09DD3CA027EE7C366DC555C9D5 200 1016824168 -1 -1 image/jpeg 27296/27296 GET http://compositor-server:8080/compositor?

# headers from the compositor-server:

[root@squid-reverse-proxy squid]# telnet compositor-server 8080
Trying IP...
Connected to IP.
Escape character is '^]'.
GET /compositor?image=/image.iff HTTP/1.0

HTTP/1.1 200 OK
Date: Fri, 22 Mar 2002 19:44:31 GMT
Server: Apache/1.3.22 (Unix)
Content-Length: 4860
Connection: close
Content-Type: image/jpeg

JFIFC

[ removed the garbage, which is the image ]

# squid.conf (acl are open, as this is a test environment ;)

http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 40 MB
maximum_object_size 8192 KB
maximum_object_size_in_memory 256 KB
cache_dir ufs /home/squid 5120 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/log/squid/squid.pid
ftp_passive off
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
icp_access allow all
cache_mgr drobilla@mvm.com
cache_effective_user squid
cache_effective_group squid
httpd_accel_host compositor-server
httpd_accel_port 8080

A+

David

-- 
David Robillard
UNIX admin
drobilla@hotpop.com
cell 514-831-2346
Received on Fri Mar 22 2002 - 12:55:05 MST

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