--------------------- PatchSet 5899 Date: 2003/08/21 23:27:42 Author: dwsquid Branch: icap-2_5 Tag: (none) Log: add 'Encapsulated' header parsing to icapRespModReadReply() Members: src/icap.c:1.1.16.14->1.1.16.15 Index: squid/src/icap.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap.c,v retrieving revision 1.1.16.14 retrieving revision 1.1.16.15 diff -u -r1.1.16.14 -r1.1.16.15 --- squid/src/icap.c 21 Aug 2003 23:14:08 -0000 1.1.16.14 +++ squid/src/icap.c 21 Aug 2003 23:27:42 -0000 1.1.16.15 @@ -1,5 +1,5 @@ /* - * $Id: icap.c,v 1.1.16.14 2003/08/21 23:14:08 dwsquid Exp $ + * $Id: icap.c,v 1.1.16.15 2003/08/21 23:27:42 dwsquid Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -542,6 +542,8 @@ int directResponse = 0; float ver; ErrorState *err; + char *header_enc; + char *header_enc_end; debug(81, 5) ("icapRespModReadReply: FD %d data = %p\n", fd, data); statCounter.syscalls.sock.reads++; @@ -666,6 +668,13 @@ comm_close(fd); return; } + header_enc = strstr(icap_header, "Encapsulated:"); + if (header_enc) { + header_enc_end = header_enc + strcspn(header_enc, "\r\n"); + icapParseEncapsulated(httpState->icap, header_enc, header_enc_end); + } else { + debug(81, 1) ("WARNING: icapReqModReadReply() did not find 'Encapsulated' header\n"); + } if (httpState->icap->enc_res_hdr) directResponse = 1; else if (httpState->icap->enc_res_body)