[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-bugs
Subject: [Varnish] #444: allow to handle non-GET req in vcl_miss
From: varnish-bugs () projects ! linpro ! no (Varnish)
Date: 2009-02-13 0:21:07
Message-ID: 061.ff5eb836fecc5fbff39543e90025136c () projects ! linpro ! no
[Download RAW message or body]
#444: allow to handle non-GET req in vcl_miss
-------------------------+--------------------------------------------------
Reporter: hajile | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by hajile):
excuse me for bad formatting
{{{
--- bin/varnishd/cache_center.c (revision 3756)
+++ bin/varnishd/cache_center.c (working copy)
@@ -650,7 +660,7 @@
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
- http_FilterHeader(sp, HTTPH_R_FETCH);
+ http_FilterHeader(sp, HTTPH_R_PASS); // root of evil (was FETCH),
must handle HEAD in vcl
VCL_miss_method(sp);
AZ(sp->obj->cacheable);
switch(sp->handling) {
}}}
{{{
backend test {
.host = "127.0.0.1";
.port = "8081";
}
sub vcl_recv {
if (req.request == "POST" || req.request == "PUT" || req.request ==
"DELETE") {
lookup;
}
}
sub vcl_hit {
if (req.request == "POST" || req.request == "PUT" || req.request ==
"DELETE") {
set obj.ttl = 0s;
set obj.cacheable = false;
pass;
}
}
sub vcl_miss {
if (req.request == "POST" || req.request == "PUT" || req.request ==
"DELETE") {
pass;
}
}
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/444#comment:1>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic