Revision: 14729
Author: adrian.chadd
Date: Sun Jul 11 02:51:11 2010
Log: Merge r14720:14728 from /branches/LUSCA_HEAD


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

Modified:
 /playpen/LUSCA_HEAD_ipv6
 /playpen/LUSCA_HEAD_ipv6/libhttp/HttpHeaderParse.c
 /playpen/LUSCA_HEAD_ipv6/src/HttpReply.c
 /playpen/LUSCA_HEAD_ipv6/src/client_side.c
 /playpen/LUSCA_HEAD_ipv6/src/client_side_location_rewrite.c
 /playpen/LUSCA_HEAD_ipv6/src/store_vary.c

=======================================
--- /playpen/LUSCA_HEAD_ipv6/libhttp/HttpHeaderParse.c Sun Jul 4 06:56:53 2010 +++ /playpen/LUSCA_HEAD_ipv6/libhttp/HttpHeaderParse.c Sun Jul 11 02:51:11 2010
@@ -240,7 +240,8 @@
 {
     HttpHeaderEntry *e;
     int id;
-    parse_retval_t r;
+    parse_retval_t r = PR_OK;
+
     /* note: name_start == field_start */
const char *name_end = memchr(field_start, ':', field_end - field_start);
     int name_len = name_end ? name_end - field_start : 0;
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/HttpReply.c    Mon Feb  8 01:08:16 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/HttpReply.c    Sun Jul 11 02:51:11 2010
@@ -252,8 +252,10 @@
     httpHeaderPutTime(hdr, HDR_DATE, squid_curtime);
     if (ctype) {
        httpHeaderPutStr(hdr, HDR_CONTENT_TYPE, ctype);
+       /* XXX is this potentially overwriting an existing String? */
        stringInit(&reply->content_type, ctype);
     } else
+       /* XXX is this potentially overwriting an existing String? */
        reply->content_type = StringNull;
     if (clen >= 0)
        httpHeaderPutSize(hdr, HDR_CONTENT_LENGTH, clen);
@@ -373,8 +375,10 @@
     rep->last_modified = httpHeaderGetTime(hdr, HDR_LAST_MODIFIED);
     str = httpHeaderGetStr(hdr, HDR_CONTENT_TYPE);
     if (str)
+       /* XXX is this potentially overwriting an existing String? */
        stringLimitInit(&rep->content_type, str, strcspn(str, ";\t "));
     else
+       /* XXX is this potentially overwriting an existing String? */
        rep->content_type = StringNull;
     rep->cache_control = httpHeaderGetCc(hdr);
     rep->content_range = httpHeaderGetContRange(hdr);
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/client_side.c  Sun Jul 11 02:47:00 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/client_side.c  Sun Jul 11 02:51:11 2010
@@ -1682,6 +1682,7 @@
     if (mb.size > 0) {
        comm_write_mbuf(http->conn->fd, mb, clientWriteComplete, http);
     } else {
+       memBufClean(&mb);
        storeClientRef(http->sc, http->entry,
            http->out.offset,
            http->out.offset,
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/store_vary.c   Sun Jul  4 06:56:53 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/store_vary.c   Sun Jul 11 02:51:11 2010
@@ -585,10 +585,18 @@
     state->seen_offset = offset;
if (!strLen2(e->mem_obj->reply->content_type) || strCmp(e->mem_obj->reply->content_type, "x-squid-internal/vary") != 0) {
        /* This is not our Vary marker object. Bail out. */
- debug(33, 1) ("storeLocateVary: Not our vary marker object, %s = '%s', '%s'/'%.*s'\n", + debug(33, 1) ("storeLocateVary: Not our vary marker object, %s = '%s', vary_data='%s' ; accept_encoding='%.*s'\n",
            storeKeyText(e->hash.key), e->mem_obj->url, vary_data,
            strLen2(accept_encoding) ? strLen2(accept_encoding) : 1,
            strBuf2(accept_encoding) ? strBuf2(accept_encoding) : "-");
+
+       if (strLen2(e->mem_obj->reply->content_type))
+               debug(33, 1) ("storeLocateVary: local content type: '%.*s'\n",
+                   strLen2(e->mem_obj->reply->content_type),
+                   strBuf2(e->mem_obj->reply->content_type));
+       else
+ debug(33, 1) ("storeLocateVary: reply->content_type length is 0, why!?\n");
+
        storeLocateVaryCallback(state);
        return;
     }

--
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