Revision: 14643
Author: adrian.chadd
Date: Sun May  9 10:00:16 2010
Log:
Issue #108 - rejig the content length check function to use the String value buf/len
rather than the String itself.

The routine in its entirety now can be changed to take a char * and len.


http://code.google.com/p/lusca-cache/source/detail?r=14643

Modified:
 /branches/LUSCA_HEAD/libhttp/HttpHeaderParse.c

=======================================
--- /branches/LUSCA_HEAD/libhttp/HttpHeaderParse.c      Sun May  9 06:37:25 2010
+++ /branches/LUSCA_HEAD/libhttp/HttpHeaderParse.c      Sun May  9 10:00:16 2010
@@ -106,7 +106,8 @@
                 return 1;

            /* Do the contents match? */
-           if (strCmp(*value, strBuf(e2->value)) == 0) {
+           if ((strLen2(*value) == strLen2(e2->value)) &&
+               (strNCmp(e2->value, strBuf2(*value), strLen2(*value)) == 0)) {
debug(55, httpConfig_relaxed_parser <= 0 ? 1 : 2) ("NOTICE: found double content-length header\n");
                if (httpConfig_relaxed_parser) {
                    return 0;

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to