--------------------- PatchSet 10219 Date: 2007/12/12 10:30:37 Author: adri Branch: s27_adri Tag: (none) Log: strBuf() -> strBuf2() (97 to go now!) Members: src/HttpHeader.c:1.28.6.1.4.9->1.28.6.1.4.10 Index: squid/src/HttpHeader.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v retrieving revision 1.28.6.1.4.9 retrieving revision 1.28.6.1.4.10 diff -u -r1.28.6.1.4.9 -r1.28.6.1.4.10 --- squid/src/HttpHeader.c 12 Dec 2007 09:52:09 -0000 1.28.6.1.4.9 +++ squid/src/HttpHeader.c 12 Dec 2007 10:30:37 -0000 1.28.6.1.4.10 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.28.6.1.4.9 2007/12/12 09:52:09 adri Exp $ + * $Id: HttpHeader.c,v 1.28.6.1.4.10 2007/12/12 10:30:37 adri Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -1327,8 +1327,8 @@ field_end--; if (field_end - value_start > 65534) { /* String must be LESS THAN 64K and it adds a terminating NULL */ - debug(55, 1) ("WARNING: ignoring '%s' header of %d bytes\n", - strBuf(e->name), (int) (field_end - value_start)); + debug(55, 1) ("WARNING: ignoring '%.*s' header of %d bytes\n", + strLen2(e->name), strBuf2(e->name), (int) (field_end - value_start)); if (e->id == HDR_OTHER) stringClean(&e->name); memFree(e, MEM_HTTP_HDR_ENTRY); @@ -1370,8 +1370,8 @@ Headers[id].stat.parsCount++; if (error) { Headers[id].stat.errCount++; - debug(55, 2) ("cannot parse hdr field: '%s: %s'\n", - strBuf(Headers[id].name), strBuf(context)); + debug(55, 2) ("cannot parse hdr field: '%.*s: %.*s'\n", + strLen2(Headers[id].name), strBuf2(Headers[id].name), strLen2(context), strBuf2(context)); } } @@ -1456,8 +1456,8 @@ "id", "name", "#alive", "%err", "%repeat"); for (ht = 0; ht < HDR_ENUM_END; ht++) { HttpHeaderFieldInfo *f = Headers + ht; - storeAppendPrintf(e, "%2d\t %-20s\t %5d\t %6.3f\t %6.3f\n", - f->id, strBuf(f->name), f->stat.aliveCount, + storeAppendPrintf(e, "%2d\t %-20.*s\t %5d\t %6.3f\t %6.3f\n", + f->id, strLen2(f->name), strBuf2(f->name), f->stat.aliveCount, xpercent(f->stat.errCount, f->stat.parsCount), xpercent(f->stat.repCount, f->stat.seenCount)); } @@ -1475,8 +1475,7 @@ for (i = 0; i < end; ++i) { if (name_len >= 0 && name_len != strLen(info[i].name)) continue; - if (!strncasecmp(name, strBuf(info[i].name), - name_len < 0 ? strLen(info[i].name) + 1 : name_len)) + if (!strNCaseCmp(info[i].name, name, name_len < 0 ? strLen2(info[i].name) + 1 : name_len)) return i; } return -1;