[Varnish] #363: The first POST request is replaced by GET
Varnish
varnish-bugs at projects.linpro.no
Sat Oct 25 22:55:42 CEST 2008
#363: The first POST request is replaced by GET
----------------------+-----------------------------------------------------
Reporter: tcouery | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone: Later
Component: varnishd | Version: 2.0
Severity: normal | Keywords: POST
----------------------+-----------------------------------------------------
When a POST request (RxRequest=POST) is sending for the first time and the
"vcl_fetch" choose "lookup" then the backend receive a GET request
(TxRequest=GET).
'''Varnishlog:'''
{{{
9 SessionOpen c 10.10.10.10 4202 0.0.0.0:7070
9 ReqStart c 10.10.10.10 4202 1108969861
9 RxRequest c POST
9 RxURL c /backoffice/Modification.serv
9 RxProtocol c HTTP/1.1
9 RxHeader c Host: server:7070
9 RxHeader c User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
fr; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
9 RxHeader c Accept: text/javascript, text/html, application/xml,
text/xml, */*
9 RxHeader c Accept-Language: fr,en;q=0.8,fr-fr;q=0.5,en-us;q=0.3
9 RxHeader c Accept-Encoding: gzip,deflate
9 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
9 RxHeader c Keep-Alive: 300
9 RxHeader c Connection: keep-alive
9 RxHeader c X-Requested-With: XMLHttpRequest
9 RxHeader c X-Prototype-Version: 1.6.0.2
9 RxHeader c Content-Type: application/x-www-form-urlencoded;
charset=UTF-8
9 RxHeader c Referer: http://server:7070/page.html
9 RxHeader c Content-Length: 179
9 RxHeader c Cookie: JSESSIONID=15878C33A57E8AF324F6F93A89972AD4;
9 RxHeader c Pragma: no-cache
9 RxHeader c Cache-Control: no-cache
9 VCL_call c recv
9 VCL_return c lookup
9 VCL_call c hash
9 VCL_return c hash
9 VCL_call c miss
9 VCL_return c fetch
11 BackendOpen b default 127.0.0.1 57805 127.0.0.1 8080
9 Backend c 11 default default
11 TxRequest b GET
11 TxURL b /backoffice/Modification.serv
11 TxProtocol b HTTP/1.1
11 TxHeader b Host: server:7070
11 TxHeader b User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
fr; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
11 TxHeader b Accept: text/javascript, text/html, application/xml,
text/xml, */*
11 TxHeader b Accept-Language: fr,en;q=0.8,fr-fr;q=0.5,en-us;q=0.3
11 TxHeader b Accept-Encoding: gzip,deflate
11 TxHeader b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
11 TxHeader b X-Requested-With: XMLHttpRequest
11 TxHeader b X-Prototype-Version: 1.6.0.2
11 TxHeader b Content-Type: application/x-www-form-urlencoded;
charset=UTF-8
11 TxHeader b Referer: http://server:7070/page.html
11 TxHeader b Cookie: JSESSIONID=15878C33A57E8AF324F6F93A89972AD4;
11 TxHeader b Pragma: no-cache
11 TxHeader b X-Varnish: 1108969861
11 TxHeader b X-Forwarded-For: 10.10.10.10
11 RxProtocol b HTTP/1.1
11 RxStatus b 200
11 RxResponse b OK
11 RxHeader b Server: Apache-Coyote/1.1
11 RxHeader b Cache-Control: no-cache, post-check=0, pre-check=0
11 RxHeader b Pragma: no-cache
11 RxHeader b Content-Type: application/json;charset=UTF-8
11 RxHeader b Content-Length: 116
11 RxHeader b Date: Sat, 25 Oct 2008 20:23:25 GMT
}}}
'''vcl.conf:'''
{{{
backend default {
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv {
lookup;
}
sub vcl_fetch {
if(obj.http.Pragma ~ "no-cache" ||
obj.http.Cache-Control ~ "no-cache" ||
obj.http.Cache-Control ~ "private" ||
!obj.cacheable ||
obj.http.Set-Cookie) {
pass;
}
deliver;
}
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/363>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list