On Tue, 10 Nov 2009 08:02:49 -0800 (PST), akinf <fatih.akin@xxxxxxxxxxxxxxxxxxxxxxxx> wrote: > I configured squid to enable icap preview in squid.conf like below, squid > sends me options request and > i include preview also in repsonse, but squid does not send me preview > header and no previewing occurs. > Logs are outlined below, could you please help? > > icap_enable on > icap_send_client_ip on > icap_preview_enable on > icap_preview_size 0 You expect to pass zero bytes of preview and see it? -1 == no preview, otherwise it's a fixed byte size. It can be overridden by the ICAP OPTIONS response, but your OPTIONS response says "Preview: 0" which I take it means 0 bytes again. Amos > > icap_service service_1 reqmod_precache 0 icap://localhost:1344/tt > adaptation_service_set service_set_1 service_1 > adaptation_access service_set_1 allow all > > icap_service service_2 respmod_precache 0 icap://localhost:1344/tt > adaptation_service_set service_set_2 service_2 > adaptation_access service_set_2 allow all > > > > 2009-11-10 17:25:17,481 DEBUG [ReadWriteDispatcherImpl-Thread-1] > SelectableSocketEndpoint read 67 bytes on > java.nio.channels.SocketChannel[connected local=/127.0.0.1:1344 > remote=/127.0.0.1:34802]: > 0000 4f 50 54 49 4f 4e 53 20 69 63 61 70 3a 2f 2f 6c OPTIONS icap://l > > 0010 6f 63 61 6c 68 6f 73 74 3a 31 33 34 34 2f 74 74 ocalhost :1344/tt > 0020 20 49 43 41 50 2f 31 2e 30 0d 0a 48 6f 73 74 3a ICAP/1. 0..Host: > 0030 20 6c 6f 63 61 6c 68 6f 73 74 3a 31 33 34 34 0d localho st:1344. > 0040 0a 0d 0a ... > > ................ > > [connected local=/127.0.0.1:1344 remote=/127.0.0.1:34802]: > 0000 49 43 41 50 2f 31 2e 30 20 32 30 30 20 6f 6b 0d ICAP/1.0 200 ok. > 0010 0a 4f 70 74 4d 6f 63 6b 31 3a 20 76 31 0d 0a 4f .OptMock 1: v1..O > 0020 70 74 4d 6f 63 6b 32 3a 20 76 32 0d 0a 4f 70 74 ptMock2: v2..Opt > 0030 69 6f 6e 73 2d 54 54 4c 3a 20 33 36 30 30 30 0d ions-TTL : 36000. > 0040 0a 53 65 72 76 69 63 65 2d 49 44 3a 20 74 6f 74 .Service -ID: tot > 0050 6f 0d 0a 4d 6f 63 6b 2d 48 65 61 64 65 72 3a 20 o..Mock- Header: > 0060 6d 6f 63 6b 2d 76 61 6c 75 65 0d 0a 4d 65 74 68 mock-val ue..Meth > 0070 6f 64 73 3a 20 52 45 51 4d 4f 44 2c 20 52 45 53 ods: REQ MOD, RES > 0080 50 4d 4f 44 0d 0a 50 72 65 76 69 65 77 3a 20 PMOD..Pr eview: > 0090 30 0d 0a 45 6e 63 61 70 73 75 6c 61 74 65 64 3a 0..Encap sulated: > 00a0 20 6e 75 6c 6c 2d 62 6f 64 79 3d 30 0d 0a 0d 0a null-bo dy=0.... > > -Thread-2] ReadWriteDispatcherImpl handled 0 job(s) > 2009-11-10 17:25:17,539 DEBUG [ReadWriteDispatcherImpl-Thread-2] > ReadWriteDispatcherImpl read ready on > java.nio.channels.SocketChannel[connected local=/127.0.0.1:1344 > remote=/127.0.0.1:50751] > 2009-11-10 17:25:17,540 DEBUG [ReadWriteDispatcherImpl-Thread-2] > SelectableSocketEndpoint read 584 bytes on > java.nio.channels.SocketChannel[connected local=/127.0.0.1:1344 > remote=/127.0.0.1:50751]: > 0000 52 45 51 4d 4f 44 20 69 63 61 70 3a 2f 2f 6c 6f REQMOD i cap://lo > 0010 63 61 6c 68 6f 73 74 3a 31 33 34 34 2f 74 74 20 calhost: 1344/tt > 0020 49 43 41 50 2f 31 2e 30 0d 0a 48 6f 73 74 3a 20 ICAP/1.0 ..Host: > 0030 6c 6f 63 61 6c 68 6f 73 74 3a 31 33 34 34 0d 0a localhos t:1344.. > 0040 44 61 74 65 3a 20 54 75 65 2c 20 31 30 20 4e 6f Date: Tu e, 10 No > 0050 76 20 32 30 30 39 20 31 35 3a 32 35 3a 31 37 20 v 2009 1 5:25:17 > 0060 47 4d 54 0d 0a 45 6e 63 61 70 73 75 6c 61 74 65 GMT..Enc apsulate > 0070 64 3a 20 72 65 71 2d 68 64 72 3d 30 2c 20 6e 75 d: req-h dr=0, nu > 0080 6c 6c 2d 62 6f 64 79 3d 34 30 33 0d 0a 41 6c 6c ll-body= 403..All > 0090 6f 77 3a 20 32 30 34 0d 0a 58 2d 43 6c 69 65 6e ow: 204. .X-Clien > 00a0 74 2d 49 50 3a 20 31 30 2e 35 32 2e 34 33 2e 32 t-IP: 10 .52.43.2 > 00b0 35 0d 0a 0d 0a 47 45 54 20 68 74 74 70 3a 2f 2f 5....GET http:// > 00c0 77 77 77 2e 73 61 68 69 62 69 6e 64 65 6e 2e 63 www.sahi binden.c > 00d0 6f 6d 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f om/ HTTP /1.1..Ho > 00e0 73 74 3a 20 77 77 77 2e 73 61 68 69 62 69 6e 64 st: www. sahibind > 00f0 65 6e 2e 63 6f 6d 0d 0a 41 63 63 65 70 74 3a 20 en.com.. Accept: > 0100 74 65 78 74 2f 68 74 6d 6c 2c 61 70 70 6c 69 63 text/htm l,applic > 0110 61 74 69 6f 6e 2f 78 68 74 6d 6c 2b 78 6d 6c 2c ation/xh tml+xml, > 0120 74 65 78 74 2f 63 73 73 2c 20 2a 2f 2a 0d 0a 41 text/css , */*..A > 0130 63 63 65 70 74 2d 43 68 61 72 73 65 74 3a 20 69 ccept-Ch arset: i > 0140 73 6f 2d 38 38 35 39 2d 31 2c 20 75 74 66 2d 38 so-8859- 1, utf-8 > 0150 3b 20 71 3d 30 2e 37 2c 20 2a 3b 20 71 3d 30 2e ; q=0.7, *; q=0. > 0160 37 0d 0a 41 63 63 65 70 74 2d 45 6e 63 6f 64 69 7..Accep t-Encodi > 0170 6e 67 3a 20 67 7a 69 70 2c 20 64 65 66 6c 61 74 ng: gzip , deflat > 0180 65 2c 20 78 2d 67 7a 69 70 2c 20 69 64 65 6e 74 e, x-gzi p, ident > 0190 69 74 79 3b 20 71 3d 30 2e 39 0d 0a 41 63 63 65 ity; q=0 .9..Acce > 01a0 70 74 2d 4c 61 6e 67 75 61 67 65 3a 20 74 72 3b pt-Langu age: tr; > 01b0 71 3d 31 2e 30 2c 65 6e 3b 71 3d 30 2e 35 2c 66 q=1.0,en ;q=0.5,f > 01c0 72 3b 71 3d 30 2e 35 2c 64 65 3b 71 3d 30 2e 35 r;q=0.5, de;q=0.5 > 01d0 2c 69 74 3b 71 3d 30 2e 35 2c 6e 6c 3b 71 3d 30 ,it;q=0. 5,nl;q=0 > 01e0 2e 35 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 .5..User -Agent: > 01f0 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 53 79 6d Mozilla/ 5.0 (Sym > 0200 62 69 61 6e 4f 53 2f 39 2e 31 3b 20 55 3b 20 65 bianOS/9 .1; U; e > 0210 6e 2d 75 73 29 20 41 70 70 6c 65 57 65 62 4b 69 n-us) Ap pleWebKi > 0220 74 2f 34 31 33 20 28 4b 48 54 4d 4c 2c 20 6c 69 t/413 (K HTML, li > 0230 6b 65 20 47 65 63 6b 6f 29 20 53 61 66 61 72 69 ke Gecko ) Safari > 0240 2f 34 31 33 0d 0a 0d 0a /413....