--------------------- PatchSet 1605 Date: 2005/08/25 21:09:55 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Went back to 'int' type for hdr_sz while we are trying to find the source of a potentially related bug. Eventually, the type should be changed to size_t. - Updated hdr_sz description. - Polished debugging. Members: src/HttpReply.cc:1.21.4.1->1.21.4.2 src/HttpReply.h:1.8.10.1->1.8.10.2 Index: squid3/src/HttpReply.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpReply.cc,v retrieving revision 1.21.4.1 retrieving revision 1.21.4.2 diff -u -r1.21.4.1 -r1.21.4.2 --- squid3/src/HttpReply.cc 24 Aug 2005 06:06:08 -0000 1.21.4.1 +++ squid3/src/HttpReply.cc 25 Aug 2005 21:09:55 -0000 1.21.4.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpReply.cc,v 1.21.4.1 2005/08/24 06:06:08 rousskov Exp $ + * $Id: HttpReply.cc,v 1.21.4.2 2005/08/25 21:09:55 rousskov Exp $ * * DEBUG: section 58 HTTP Reply (Response) * AUTHOR: Alex Rousskov @@ -657,10 +657,11 @@ assert(res > 0); debugs(58, 9, "HttpReply::parse success (" << hdr_len << " bytes) " << "near '" << buf->content() << "'"); - if (hdr_sz != hdr_len) { - debugs(58, 1, "internal HttpReply::parse size calc error: " << + if (hdr_sz != (int)hdr_len) { + debugs(58, 1, "internal HttpReply::parse vs. headersEnd error: " << hdr_sz << " != " << hdr_len); - hdr_sz = hdr_len; // because old http.cc code used hdr_len + hdr_sz = (int)hdr_len; // because old http.cc code used hdr_len } + return true; } Index: squid3/src/HttpReply.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpReply.h,v retrieving revision 1.8.10.1 retrieving revision 1.8.10.2 diff -u -r1.8.10.1 -r1.8.10.2 --- squid3/src/HttpReply.h 24 Aug 2005 06:06:08 -0000 1.8.10.1 +++ squid3/src/HttpReply.h 25 Aug 2005 21:09:55 -0000 1.8.10.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpReply.h,v 1.8.10.1 2005/08/24 06:06:08 rousskov Exp $ + * $Id: HttpReply.h,v 1.8.10.2 2005/08/25 21:09:55 rousskov Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -94,8 +94,10 @@ // returns false and sets *error to a positive http_status code on error bool parse(MemBuf *buf, bool eof, http_status *error); - /* unsupported, writable, may disappear/change in the future */ - size_t hdr_sz; /* sums _stored_ status-line, headers, and */ + /* Unsupported, writable, may disappear/change in the future + * Sums _stored_ status-line, headers, and . + * Also used to report parsed header size if parse() is successful */ + int hdr_sz; /* public, readable; never update these or their .hdr equivalents directly */ int content_length;