--------------------- PatchSet 10260 Date: 2007/12/16 15:26:36 Author: adri Branch: s27_adri Tag: (none) Log: Eliminate strBuf() acll. Replace with iterator-type access. Members: src/http.c:1.63.2.3.4.11->1.63.2.3.4.12 Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.63.2.3.4.11 retrieving revision 1.63.2.3.4.12 diff -u -r1.63.2.3.4.11 -r1.63.2.3.4.12 --- squid/src/http.c 16 Dec 2007 13:17:45 -0000 1.63.2.3.4.11 +++ squid/src/http.c 16 Dec 2007 15:26:36 -0000 1.63.2.3.4.12 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.63.2.3.4.11 2007/12/16 13:17:45 adri Exp $ + * $Id: http.c,v 1.63.2.3.4.12 2007/12/16 15:26:36 adri Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -687,10 +687,10 @@ } } else { /* trailer */ - const char *p = strBuf(httpState->chunkhdr); - while (*p == '\r') - p++; - if (*p == '\n') { + int l = 0; + while (strGetPos(httpState->chunkhdr, l) != -1 && strGetPos(httpState->chunkhdr, l) == '\r') + l++; + if (strGetPos(httpState->chunkhdr, l) == '\n') { complete = 1; debug(11, 2) ("Chunked response complete\n"); }