httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Steinmetz <...@domdv.de>
Subject 2.1.2-alpha http/ftp proxy/cache problems
Date Sun, 12 Dec 2004 14:49:56 GMT
Both problems described below relate to the http and the ftp proxy with 
cache enabled. URLs and proxy setup are given at the end of this mail.

Problem 1 - http:

It happens from time to time that when URL 1 is reloaded and then URL 2 
is reloaded in Mozilla that /v2/ (URL 2) is requested by the proxy from 
a server related to URL 1, resulting in the following 404:

Not Found
The requested URL /v2/ was not found on this server.

Apache/1.3.27 Server at www.bitmover.com Port 80

It seems from the tcpdump that <img 
src="http://www.bitmover.com/gifs/bitkeeper-shadow.gif"> is requested by 
the proxy resulting in a 304 and then the same tcp connection is 
erroneously reused to request the www.wetter.com URL. tcpdump excerpt:


15:11:51.745134 IP 80.140.165.47.1949 > 192.132.92.2.80: P 1:506(505) 
ack 1 win
5808
         0x0020:  5018 16b0 f075 0000 4745 5420 2f67 6966  P....u..GET./gif
         0x0030:  732f 6269 746b 6565 7065 722d 7368 6164  s/bitkeeper-shad
         0x0040:  6f77 2e67 6966 2048 5454 502f 312e 310d  ow.gif.HTTP/1.1.
         0x0050:  0a48 6f73 743a 2077 7777 2e62 6974 6d6f  .Host:.www.bitmo
         0x0060:  7665 722e 636f 6d0d 0a55 7365 722d 4167  ver.com..User-Ag
         0x0070:  656e 743a 204d 6f7a 696c 6c61 2f35 2e30  ent:.Mozilla/5.0
         0x0080:  2028 5831 313b 2055 3b20 4c69 6e75 7820  .(X11;.U;.Linux.
         0x0090:  6936 3836 3b20 656e 2d55 533b 2072 763a  i686;.en-US;.rv:
         0x00a0:  312e 372e 3329 2047 6563 6b6f 2f32 3030  1.7.3).Gecko/200
         0x00b0:  3430 3931 380d 0a41 6363 6570 743a 2069  40918..Accept:.i
         0x00c0:  6d61 6765 2f70 6e67 2c2a 2f2a 3b71 3d30  mage/png,*/*;q=0
         0x00d0:  2e35 0d0a 4163 6365 7074 2d4c 616e 6775  .5..Accept-Langu
         0x00e0:  6167 653a 2065 6e2d 7573 2c65 6e3b 713d  age:.en-us,en;q=
         0x00f0:  302e 372c 6465 3b71 3d30 2e33 0d0a 4163  0.7,de;q=0.3..Ac
         0x0100:  6365 7074 2d45 6e63 6f64 696e 673a 2067  cept-Encoding:.g
         0x0110:  7a69 702c 6465 666c 6174 650d 0a41 6363  zip,deflate..Acc
         0x0120:  6570 742d 4368 6172 7365 743a 2049 534f  ept-Charset:.ISO
         0x0130:  2d38 3835 392d 3135 2c75 7466 2d38 3b71  -8859-15,utf-8;q
         0x0140:  3d30 2e37 2c2a 3b71 3d30 2e37 0d0a 5265  =0.7,*;q=0.7..Re
         0x0150:  6665 7265 723a 2068 7474 703a 2f2f 6c69  ferer:.http://li
         0x0160:  6e75 782e 626b 6269 7473 2e6e 6574 3a38  nux.bkbits.net:8
         0x0170:  3038 302f 6c69 6e75 782d 322e 352f 4368  080/linux-2.5/Ch
         0x0180:  616e 6765 5365 7440 2d37 643f 6e61 763d  angeSet@-7d?nav=
         0x0190:  696e 6465 782e 6874 6d6c 0d0a 4966 2d4d  index.html..If-M
         0x01a0:  6f64 6966 6965 642d 5369 6e63 653a 2053  odified-Since:.S
         0x01b0:  6174 2c20 3238 2046 6562 2032 3030 3420  at,.28.Feb.2004.
         0x01c0:  3137 3a32 313a 3033 2047 4d54 0d0a 4966  17:21:03.GMT..If
         0x01d0:  2d4e 6f6e 652d 4d61 7463 683a 2022 3334  -None-Match:."34
         0x01e0:  3433 332d 3230 3361 2d34 3034 3063 6466  433-203a-4040cdf
         0x01f0:  6622 0d0a 4361 6368 652d 436f 6e74 726f  f"..Cache-Contro
         0x0200:  6c3a 206d 6178 2d61 6765 3d30 0d0a 4d61  l:.max-age=0..Ma
         0x0210:  782d 466f 7277 6172 6473 3a20 350d 0a0d  x-Forwards:.5...


15:11:51.999590 IP 192.132.92.2.80 > 80.140.165.47.1949: P 1:187(186) 
ack 506 wi
n 6432
         0x0020:  5018 1920 805b 0000 4854 5450 2f31 2e31  P....[..HTTP/1.1
         0x0030:  2033 3034 204e 6f74 204d 6f64 6966 6965  .304.Not.Modifie
         0x0040:  640d 0a44 6174 653a 2053 756e 2c20 3132  d..Date:.Sun,.12
         0x0050:  2044 6563 2032 3030 3420 3134 3a31 313a  .Dec.2004.14:11:
         0x0060:  3530 2047 4d54 0d0a 5365 7276 6572 3a20  50.GMT..Server:.
         0x0070:  4170 6163 6865 2f31 2e33 2e32 3720 2855  Apache/1.3.27.(U
         0x0080:  6e69 7829 2020 2852 6564 2d48 6174 2f4c  nix)..(Red-Hat/L
         0x0090:  696e 7578 2920 6d6f 645f 7373 6c2f 322e  inux).mod_ssl/2.
         0x00a0:  382e 3132 204f 7065 6e53 534c 2f30 2e39  8.12.OpenSSL/0.9
         0x00b0:  2e36 6220 6d6f 645f 7065 726c 2f31 2e32  .6b.mod_perl/1.2
         0x00c0:  360d 0a45 5461 673a 2022 3334 3433 332d  6..ETag:."34433-
         0x00d0:  3230 3361 2d34 3034 3063 6466 6622 0d0a  203a-4040cdff"..
         0x00e0:  0d0a                                     ..


15:11:53.180488 IP 80.140.165.47.1949 > 192.132.92.2.80: P 506:995(489) 
ack 187
win 6432
         0x0020:  5018 1920 172f 0000 4745 5420 2f76 322f  P..../..GET./v2/
         0x0030:  3f53 4944 3d26 4c41 4e47 3d44 4526 4c4f  ?SID=&LANG=DE&LO
         0x0040:  433d 3032 3830 264c 4f43 4652 4f4d 3d30  C=0280&LOCFROM=0
         0x0050:  3230 3226 7265 6769 6f6e 3d42 5920 4854  202&region=BY.HT
         0x0060:  5450 2f31 2e31 0d0a 486f 7374 3a20 7777  TP/1.1..Host:.ww
         0x0070:  772e 7765 7474 6572 2e63 6f6d 0d0a 5573  w.wetter.com..Us
         0x0080:  6572 2d41 6765 6e74 3a20 4d6f 7a69 6c6c  er-Agent:.Mozill
         0x0090:  612f 352e 3020 2858 3131 3b20 553b 204c  a/5.0.(X11;.U;.L
         0x00a0:  696e 7578 2069 3638 363b 2065 6e2d 5553  inux.i686;.en-US
         0x00b0:  3b20 7276 3a31 2e37 2e33 2920 4765 636b  ;.rv:1.7.3).Geck
         0x00c0:  6f2f 3230 3034 3039 3138 0d0a 4163 6365  o/20040918..Acce
         0x00d0:  7074 3a20 7465 7874 2f78 6d6c 2c61 7070  pt:.text/xml,app
         0x00e0:  6c69 6361 7469 6f6e 2f78 6d6c 2c61 7070  lication/xml,app
         0x00f0:  6c69 6361 7469 6f6e 2f78 6874 6d6c 2b78  lication/xhtml+x
         0x0100:  6d6c 2c74 6578 742f 6874 6d6c 3b71 3d30  ml,text/html;q=0
         0x0110:  2e39 2c74 6578 742f 706c 6169 6e3b 713d  .9,text/plain;q=
         0x0120:  302e 382c 696d 6167 652f 706e 672c 2a2f  0.8,image/png,*/
         0x0130:  2a3b 713d 302e 350d 0a41 6363 6570 742d  *;q=0.5..Accept-
         0x0140:  4c61 6e67 7561 6765 3a20 656e 2d75 732c  Language:.en-us,
         0x0150:  656e 3b71 3d30 2e37 2c64 653b 713d 302e  en;q=0.7,de;q=0.
         0x0160:  330d 0a41 6363 6570 742d 456e 636f 6469  3..Accept-Encodi
         0x0170:  6e67 3a20 677a 6970 2c64 6566 6c61 7465  ng:.gzip,deflate
         0x0180:  0d0a 4163 6365 7074 2d43 6861 7273 6574  ..Accept-Charset
         0x0190:  3a20 4953 4f2d 3838 3539 2d31 352c 7574  :.ISO-8859-15,ut
         0x01a0:  662d 383b 713d 302e 372c 2a3b 713d 302e  f-8;q=0.7,*;q=0.
         0x01b0:  370d 0a43 6f6f 6b69 653a 2073 6f69 5f74  7..Cookie:.soi_t
         0x01c0:  6573 745f 636f 6f6b 6965 3d74 6573 743b  est_cookie=test;
         0x01d0:  2073 6f69 5f70 6f70 5f62 6c6f 636b 6564  .soi_pop_blocked
         0x01e0:  3d31 3b20 504f 5055 5043 4845 434b 3d31  =1;.POPUPCHECK=1
         0x01f0:  3130 3238 3834 3034 3339 3834 0d0a 4d61  102884043984..Ma
         0x0200:  782d 466f 7277 6172 6473 3a20 350d 0a0d  x-Forwards:.5...
         0x0210:  0a                                       .

================================================================================

Problem 2 - ftp:

Requesting URL 3 and then instantly URL 4 results in the directory of 
URL 3 being returned as the directory of URL 4.

 From looking at the tcpdump the proxy does connect for both requests to 
the same server, ftp.de.uu.net, which is incorrect as the second server 
is ftp.gnu.org. tcpdump excerpt:

15:31:24.325082 IP 195.129.111.8.21 > 80.140.165.47.2103: P 10:86(76) 
ack 1 win
65340
         0x0000:  4510 0074 feee 4000 3806 1b40 c381 6f08  E..t..@.8..@..o.
         0x0010:  508c a52f 0015 0837 22d6 43fa 8bda eeae  P../...7".C.....
         0x0020:  5018 ff3c f430 0000 2057 656c 636f 6d65  P..<.0...Welcome
         0x0030:  2074 6f20 7468 6520 5555 4e45 5420 454d  .to.the.UUNET.EM
         0x0040:  4541 2046 5450 2073 6974 652c 2075 7365  EA.FTP.site,.use
         0x0050:  7220 6672 6f6d 2070 3530 3843 4135 3246  r.from.p508CA52F
         0x0060:  2e64 6970 2e74 2d64 6961 6c69 6e2e 6e65  .dip.t-dialin.ne
         0x0070:  742e 0d0a                                t...

15:31:27.392237 IP 195.129.111.8.21 > 80.140.165.47.2105: P 10:86(76) 
ack 1 win
65340
         0x0000:  4510 0074 ff11 4000 3806 1b1d c381 6f08  E..t..@.8.....o.
         0x0010:  508c a52f 0015 0839 94d2 0dbe 8cea b37e  P../...9.......~
         0x0020:  5018 ff3c f28e 0000 2057 656c 636f 6d65  P..<.....Welcome
         0x0030:  2074 6f20 7468 6520 5555 4e45 5420 454d  .to.the.UUNET.EM
         0x0040:  4541 2046 5450 2073 6974 652c 2075 7365  EA.FTP.site,.use
         0x0050:  7220 6672 6f6d 2070 3530 3843 4135 3246  r.from.p508CA52F
         0x0060:  2e64 6970 2e74 2d64 6961 6c69 6e2e 6e65  .dip.t-dialin.ne
         0x0070:  742e 0d0a                                t...

If the cache is bypassed for the second request by the proxy client as 
shown in the dump excerpt below the second request is fetched by the 
proxy from the correct ftp server so this seems to be a cache 
interworking problem.

         0x01c0:  5072 6167 6d61 3a20 6e6f 2d63 6163 6865  Pragma:.no-cache
         0x01d0:  0d0a 4361 6368 652d 436f 6e74 726f 6c3a  ..Cache-Control:
         0x01e0:  206e 6f2d 6361 6368 650d 0a0d 0a         .no-cache....

================================================================================

Software:

httpd-2.1.2-alpha plus svn 111359 (ftp proxy fix) on Linux 2.4

URL 1:

http://linux.bkbits.net:8080/linux-2.5/ChangeSet@-7d?nav=index.html

URL 2:

http://www.wetter.com/v2/?SID=&LANG=DE&LOC=0280&LOCFROM=0202&region=BY

URL 3:

ftp://ftp.de.uu.net/

URL 4:

ftp://ftp.gnu.org/

Proxy Config (the actual proxy is hades, zeus is included to allow for 
work at home without client proxy setup reconfiguration):

Listen *:8080
<VirtualHost hades.lan.domdv.de:8080>
ServerName hades.lan.domdv.de
SSLEngine off
AddHandler cgi-script .cfg
DirectoryIndex index.shtml
<Directory /var/apache/proxywww/>
     Order deny,allow
     Allow from 10.1.9.0/24 127.0.0.1
     Deny from all
     Options Includes ExecCGI
     AllowOverride none
</Directory>
Alias / /var/apache/proxywww/
CustomLog /dev/null common
ProxyRequests On
DefaultType application/octet-stream
<Proxy *>
     RewriteEngine On
     RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$ [NC]
     RewriteCond %{HTTP_USER_AGENT} !^.*Opera.*$ [NC]
     RewriteRule ^.*$ /deny.html  [L]
     Order deny,allow
     Allow from 10.1.9.0/24 127.0.0.1
     Deny from all
</Proxy>
ProxyVia Block
ProxyDomain .lan.domdv.de
AllowCONNECT 443 563
CacheRoot "/var/apache/proxy"
CacheDefaultExpire 60
CacheIgnoreNoLastMod On
CacheLastModifiedFactor 0.1
CacheMaxExpire 86400
NoProxy .lan.domdv.de
ProxyMaxForwards 5
CacheDirLength 1
CacheDirLevels 2
CacheMinFileSize 1
CacheMaxFileSize 524288
CacheEnable disk /
</VirtualHost>
<VirtualHost zeus.lan.domdv.de:8080>
SSLEngine off
AddHandler cgi-script .cfg
DirectoryIndex index.shtml
<Directory /var/apache/proxywww/>
     Order deny,allow
     Allow from 10.1.9.0/24 127.0.0.1
     Deny from all
     Options Includes ExecCGI
     AllowOverride none
</Directory>
Alias / /var/apache/proxywww/
CustomLog /dev/null common
ProxyRequests On
DefaultType application/octet-stream
<Proxy *>
     RewriteEngine On
     RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$ [NC]
     RewriteCond %{HTTP_USER_AGENT} !^.*Opera.*$ [NC]
     RewriteRule ^.*$ /deny.html  [L]
     Order deny,allow
     Allow from 10.1.9.0/24 127.0.0.1
     Deny from all
</Proxy>
ProxyVia Block
ProxyDomain .lan.domdv.de
AllowCONNECT 443 563
CacheRoot "/var/apache/proxy"
CacheDefaultExpire 60
CacheIgnoreNoLastMod On
CacheLastModifiedFactor 0.1
CacheMaxExpire 86400
NoProxy .lan.domdv.de
ProxyMaxForwards 5
CacheDirLength 1
CacheDirLevels 2
CacheMinFileSize 1
CacheMaxFileSize 524288
CacheEnable disk /
</VirtualHost>
-- 
Andreas Steinmetz                       SPAMmers use robotrap@domdv.de

Mime
View raw message