Post requests

André Cruz andre.cruz at segula.pt
Fri Jul 6 11:14:30 CEST 2007


I'm still having problems with POST requests. This time I recorded  
more information to try and make sense of this.

Version: 1.1 branch r1656
cmd line:  ./varnishd -a :8080 -b 127.0.0.1:80 -d -d -n /tmp/pretty
VCL: the default is used

The browser request as seen through wireshark:

POST /create.bml HTTP/1.1
Host: andre.localhost:8080
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: 
1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/ 
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://andre.localhost:8080/create.bml
Cookie: ljuniq=btZhgKFp2s9UaAi:1183650844; ljuniq=btZhgKFp2s9UaAi: 
1183650844
Content-Type: application/x-www-form-urlencoded
Content-Length: 164

mode=submit&code=&ssl=&email=&password1=&user=&answer=&captcha_chal=c0%3 
A1183708800%3A3053%3A900%3A7IS6nKjgirIie2gTdXVz% 
3Ae51274fe8457d7b25ef7c1f6e68fbbae&x=61&y=19


Varnish log content:

     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712178
     0 WorkThread     0x8679a134 start
    11 SessionOpen  c 10.134.145.2 49924
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712181
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712184
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712187
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712190
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712193
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712196
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712199
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712202
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712205
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712208
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712211
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712214
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712217
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712220
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712223
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712226
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712229
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712232
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712235
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712238
    11 SessionClose c pipe
    11 ReqStart     c 10.134.145.2 49924 2113606171
    11 RxRequest    c POST
    11 RxURL        c /create.bml
    11 RxProtocol   c HTTP/1.1
    11 RxHeader     c Host: andre.localhost:8080
    11 RxHeader     c User-Agent: Mozilla/5.0 (Macintosh; U; Intel  
Mac OS X; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
    11 RxHeader     c Accept: text/xml,application/xml,application/ 
xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    11 RxHeader     c Accept-Language: en-us,en;q=0.5
    11 RxHeader     c Accept-Encoding: gzip,deflate
    11 RxHeader     c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    11 RxHeader     c Keep-Alive: 300
    11 RxHeader     c Connection: keep-alive
    11 RxHeader     c Referer: http://andre.localhost:8080/create.bml
    11 RxHeader     c Cookie: ljuniq=btZhgKFp2s9UaAi:1183650844;  
ljuniq=btZhgKFp2s9UaAi:1183650844
    11 RxHeader     c Content-Type: application/x-www-form-urlencoded
    11 RxHeader     c Content-Length: 164
    11 VCL_call     c recv
    11 VCL_return   c pipe
    11 VCL_call     c pipe
    11 VCL_return   c pipe
    14 BackendOpen  b default 127.0.0.1 38662 127.0.0.1 80
    14 BackendXID   b 2113606171
    11 Backend      c 14 default
    14 TxRequest    b GET
    14 TxURL        b /create.bml
    14 TxProtocol   b HTTP/1.1
    14 TxHeader     b Host: andre.localhost:8080
    14 TxHeader     b User-Agent: Mozilla/5.0 (Macintosh; U; Intel  
Mac OS X; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
    14 TxHeader     b Accept: text/xml,application/xml,application/ 
xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    14 TxHeader     b Accept-Language: en-us,en;q=0.5
    14 TxHeader     b Accept-Encoding: gzip,deflate
    14 TxHeader     b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    14 TxHeader     b Connection: keep-alive
    14 TxHeader     b Referer: http://andre.localhost:8080/create.bml
    14 TxHeader     b Cookie: ljuniq=btZhgKFp2s9UaAi:1183650844;  
ljuniq=btZhgKFp2s9UaAi:1183650844
    14 TxHeader     b Content-Type: application/x-www-form-urlencoded
    14 TxHeader     b Content-Length: 164
    14 TxHeader     b X-Varnish: 2113606171
    14 TxHeader     b X-Forwarded-for: 10.134.145.2
    14 BackendClose b default
    11 ReqEnd       c 2113606171 1183712178.629895424  
1183712238.683765133 0.000704753 0.000207682 60.053662027
     0 StatAddr       10.134.145.2 0 60 1 1 1 0 0 0 0
    11 StatSess     c 10.134.145.2 49924 60 1 1 1 0 0 0 0
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712241
     0 CLI            Rd ping
     0 CLI            Wr 0 200 PONG 1183712244



I don't know what to make of this... After some time waiting for  
something Varnish processes a POST form the browser but sends a GET  
to the backend? Nothing reaches the browser btw. Strange stuff..  
Maybe someone can shed some light on this...

Thanks for the help!
André


On 2007/07/05, at 12:33, Dag-Erling Smørgrav wrote:

> André Cruz <andre.cruz at segula.pt> writes:
>> I'm having problems with POST requests. They reach varnish but  
>> nothing
>> happens and the backend is not contacted.
>>
>> I see this in the log:
>>     11 SessionOpen  c 10.134.145.2 51721
>>
>> ...
>>     11 Debug        c "Pipe Shut read(read)"
>>     11 Debug        c "Pipe Shut write(read)"
>>
>> I found this ticket "http://varnish.projects.linpro.no/ticket/47"
>> which seemed to refer to my problem but even switching to "pipe" does
>> not solve it.
>
> "Pipe Shut" comes from the pipe code, so switching *to* pipe won't  
> make
> any difference because it already *is* pipe.
>
> This is not an error message, BTW, just an indication that a pipe
> session ended.
>
> DES
> -- 
> Dag-Erling Smørgrav
> Senior Software Developer
> Linpro AS - www.linpro.no




More information about the varnish-misc mailing list