r4688 - in branches/2.1: . varnish-cache/bin/varnishd varnish-cache/bin/varnishtest varnish-cache/bin/varnishtest/tests varnish-cache/include varnish-cache/lib/libvarnish varnish-cache/lib/libvcl
tfheen at varnish-cache.org
tfheen at varnish-cache.org
Mon Apr 19 14:06:44 CEST 2010
Author: tfheen
Date: 2010-04-19 14:06:44 +0200 (Mon, 19 Apr 2010)
New Revision: 4688
Added:
branches/2.1/varnish-cache/bin/varnishtest/tests/r00679.vtc
Modified:
branches/2.1/
branches/2.1/varnish-cache/bin/varnishd/cache_backend.h
branches/2.1/varnish-cache/bin/varnishd/cache_backend_cfg.c
branches/2.1/varnish-cache/bin/varnishd/cache_center.c
branches/2.1/varnish-cache/bin/varnishd/vparam.h
branches/2.1/varnish-cache/bin/varnishtest/tests/b00000.vtc
branches/2.1/varnish-cache/bin/varnishtest/tests/c00019.vtc
branches/2.1/varnish-cache/bin/varnishtest/tests/r00325.vtc
branches/2.1/varnish-cache/bin/varnishtest/tests/r00416.vtc
branches/2.1/varnish-cache/bin/varnishtest/tests/v00011.vtc
branches/2.1/varnish-cache/bin/varnishtest/vtc_http.c
branches/2.1/varnish-cache/include/vct.h
branches/2.1/varnish-cache/include/vev.h
branches/2.1/varnish-cache/lib/libvarnish/tcp.c
branches/2.1/varnish-cache/lib/libvarnish/vev.c
branches/2.1/varnish-cache/lib/libvcl/vcc_dir_random.c
Log:
Merge r4662: We converted HEAD to GET in vcl_recv{}, that is far too
early, since it also affects pipe and pass processing.
Move the HEAD->GET override to vcl_miss{} and do it on the bereq.* so
we do not tamper with the original request.
Fixes: #679
Property changes on: branches/2.1
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:4637,4640,4643-4645,4647-4650,4654-4661
+ /trunk:4637,4640,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/bin/varnishd/cache_backend.h
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/bin/varnishd/cache_backend.h:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/bin/varnishd/cache_backend.h:4637,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/bin/varnishd/cache_backend_cfg.c
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c:4637,4643-4645,4647-4650,4654-4662
Modified: branches/2.1/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- branches/2.1/varnish-cache/bin/varnishd/cache_center.c 2010-04-19 12:00:29 UTC (rev 4687)
+++ branches/2.1/varnish-cache/bin/varnishd/cache_center.c 2010-04-19 12:06:44 UTC (rev 4688)
@@ -866,6 +866,7 @@
sp->wrk->bereq = sp->wrk->http[0];
http_Setup(sp->wrk->bereq, sp->wrk->ws);
http_FilterHeader(sp, HTTPH_R_FETCH);
+ http_ForceGet(sp->wrk->bereq);
sp->wrk->connect_timeout = 0;
sp->wrk->first_byte_timeout = 0;
sp->wrk->between_bytes_timeout = 0;
@@ -1050,10 +1051,9 @@
assert(sp->handling == VCL_RET_HASH);
SHA256_Final(sp->digest, sp->wrk->sha256ctx);
- if (!strcmp(sp->http->hd[HTTP_HDR_REQ].b, "HEAD")) {
+ if (!strcmp(sp->http->hd[HTTP_HDR_REQ].b, "HEAD"))
sp->wantbody = 0;
- http_ForceGet(sp->http);
- } else
+ else
sp->wantbody = 1;
sp->sendbody = 0;
Property changes on: branches/2.1/varnish-cache/bin/varnishd/vparam.h
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/bin/varnishd/vparam.h:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/bin/varnishd/vparam.h:4637,4643-4645,4647-4650,4654-4662
Modified: branches/2.1/varnish-cache/bin/varnishtest/tests/b00000.vtc
===================================================================
--- branches/2.1/varnish-cache/bin/varnishtest/tests/b00000.vtc 2010-04-19 12:00:29 UTC (rev 4687)
+++ branches/2.1/varnish-cache/bin/varnishtest/tests/b00000.vtc 2010-04-19 12:06:44 UTC (rev 4688)
@@ -11,6 +11,8 @@
varnish v1 -arg "-smalloc,1m" -vcl+backend {} -start
+varnish v1 -cliok "param.set diag_bitmap 0x2"
+
varnish v1 -expect n_object == 0
varnish v1 -expect client_conn == 0
varnish v1 -expect client_req == 0
Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/c00019.vtc
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc:4637,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/r00325.vtc
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/bin/varnishtest/tests/r00325.vtc:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/bin/varnishtest/tests/r00325.vtc:4637,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/r00416.vtc
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/bin/varnishtest/tests/r00416.vtc:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/bin/varnishtest/tests/r00416.vtc:4637,4643-4645,4647-4650,4654-4662
Copied: branches/2.1/varnish-cache/bin/varnishtest/tests/r00679.vtc (from rev 4662, trunk/varnish-cache/bin/varnishtest/tests/r00679.vtc)
===================================================================
--- branches/2.1/varnish-cache/bin/varnishtest/tests/r00679.vtc (rev 0)
+++ branches/2.1/varnish-cache/bin/varnishtest/tests/r00679.vtc 2010-04-19 12:06:44 UTC (rev 4688)
@@ -0,0 +1,16 @@
+# $Id$
+
+test "pass + HEAD"
+
+server s1 {
+ rxreq
+ expect req.request == "HEAD"
+ txresp
+} -start
+
+varnish v1 -vcl+backend {} -start
+
+client c1 {
+ txreq -req HEAD -hdr "Cookie: foo=bar"
+ rxresp -no_obj
+} -run
Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/v00011.vtc
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc:4637,4643-4645,4647-4650,4654-4662
Modified: branches/2.1/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- branches/2.1/varnish-cache/bin/varnishtest/vtc_http.c 2010-04-19 12:00:29 UTC (rev 4687)
+++ branches/2.1/varnish-cache/bin/varnishtest/vtc_http.c 2010-04-19 12:06:44 UTC (rev 4688)
@@ -467,6 +467,7 @@
cmd_http_rxresp(CMD_ARGS)
{
struct http *hp;
+ int has_obj = 1;
(void)cmd;
(void)vl;
@@ -476,11 +477,17 @@
av++;
for(; *av != NULL; av++)
- vtc_log(hp->vl, 0, "Unknown http rxresp spec: %s\n", *av);
+ if (!strcmp(*av, "-no_obj"))
+ has_obj = 0;
+ else
+ vtc_log(hp->vl, 0,
+ "Unknown http rxresp spec: %s\n", *av);
vtc_log(hp->vl, 3, "rxresp");
http_rxhdr(hp);
http_splitheader(hp, 0);
- if (!strcmp(hp->resp[1], "200"))
+ if (!has_obj)
+ ;
+ else if (!strcmp(hp->resp[1], "200"))
http_swallow_body(hp, hp->resp, 1);
else
http_swallow_body(hp, hp->resp, 0);
Property changes on: branches/2.1/varnish-cache/include/vct.h
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/include/vct.h:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/include/vct.h:4637,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/include/vev.h
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/include/vev.h:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/include/vev.h:4637,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/lib/libvarnish/tcp.c
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/lib/libvarnish/tcp.c:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/lib/libvarnish/tcp.c:4637,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/lib/libvarnish/vev.c
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/lib/libvarnish/vev.c:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/lib/libvarnish/vev.c:4637,4643-4645,4647-4650,4654-4662
Property changes on: branches/2.1/varnish-cache/lib/libvcl/vcc_dir_random.c
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/varnish-cache/lib/libvcl/vcc_dir_random.c:4637,4643-4645,4647-4650,4654-4661
+ /trunk/varnish-cache/lib/libvcl/vcc_dir_random.c:4637,4643-4645,4647-4650,4654-4662
More information about the varnish-commit
mailing list