Varnish vs. X-JSON header

Florian Engelhardt f.engelhardt at 21torr.com
Fri Mar 28 08:15:59 CET 2008


On Fri, 28 Mar 2008 06:27:22 +0100
Stig Sandbeck Mathisen <ssm at linpro.no> wrote:

> On Thu, 27 Mar 2008 15:55:09 +0100, Florian Engelhardt
> <f.engelhardt at 21torr.com> said:
> 
> > Why is this X-JSON header missing when requested via varnish?
> 
> It would help if you include output from varnishlog which shows both
> the client and the backend communication from one request.  That'll
> provide sufficient detail of all request and response headers
> transferred between the backend, varnish, and the client during that
> transaction.

Here it is:

    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1206687625
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1206687628
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1206687631
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1206687634
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1206687637
    0 WorkThread   - 0x43203c20 start
   14 SessionOpen  c xxx.xxx.xxx.xxx 11851
   14 ReqStart     c xxx.xxx.xxx.xxx 11851 1310276097
   14 RxRequest    c GET
   14 RxURL        c /test.php
   14 RxProtocol   c HTTP/1.1
   14 RxHeader     c User-Agent: curl/7.18.0 (i686-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3
   14 RxHeader     c Host: server.net
   14 RxHeader     c Accept: */*
   14 VCL_call     c recv
   14 VCL_return   c pass
   14 VCL_call     c pass
   14 VCL_return   c pass
   15 BackendOpen  b default 127.0.0.1 38592 127.0.0.1 81
   15 TxRequest    b GET
   15 TxURL        b /test.php
   15 TxProtocol   b HTTP/1.1
   15 TxHeader     b User-Agent: curl/7.18.0 (i686-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3
   15 TxHeader     b Host: server.net
   15 TxHeader     b Accept: */*
   15 TxHeader     b X-Varnish: 1310276097
   15 TxHeader     b X-Forwarded-for: xxx.xxx.xxx.xxx
   15 RxProtocol   b HTTP/1.1
   15 RxStatus     b 200
   15 RxResponse   b OK
   15 RxHeader     b Transfer-Encoding: chunked
   15 RxHeader     b Expires: Sat, 29 Mar 2008 07:00:39 GMT
   15 RxHeader     b Cache-Control: max-age=86400
   15 RxHeader     b X-JSON: foobar
   15 RxHeader     b Pragma: test
   15 RxHeader     b Content-type: text/html
   15 RxHeader     b Date: Fri, 28 Mar 2008 07:00:39 GMT
   15 RxHeader     b Server: lighttpd
   14 ObjProtocol  c HTTP/1.1
   14 ObjStatus    c 200
   14 ObjResponse  c OK
   14 ObjHeader    c Expires: Sat, 29 Mar 2008 07:00:39 GMT
   14 ObjHeader    c Cache-Control: max-age=86400
   14 ObjHeader    c X-JSON: foobar
   14 ObjHeader    c Pragma: test
   14 ObjHeader    c Content-type: text/html
   14 ObjHeader    c Date: Fri, 28 Mar 2008 07:00:39 GMT
   14 ObjHeader    c Server: lighttpd
   15 BackendReuse b default
   14 TTL          c 1310276097 RFC 86399 1206687639 1206687639 1206774039 86400 0
   14 VCL_call     c fetch
   14 VCL_return   c insert
   14 Length       c 6
   14 VCL_call     c deliver
   14 VCL_return   c deliver
   14 TxProtocol   c HTTP/1.1
   14 TxStatus     c 200
   14 TxResponse   c OK
   14 TxHeader     c Expires: Sat, 29 Mar 2008 07:00:39 GMT
   14 TxHeader     c Cache-Control: max-age=86400
   14 TxHeader     c X-JSON: foobar
   14 TxHeader     c Pragma: test
   14 TxHeader     c Content-type: text/html
   14 TxHeader     c Server: lighttpd
   14 TxHeader     c Content-Length: 6
   14 TxHeader     c Date: Fri, 28 Mar 2008 07:00:39 GMT
   14 TxHeader     c X-Varnish: 1310276097
   14 TxHeader     c Age: 0
   14 TxHeader     c Via: 1.1 varnish
   14 TxHeader     c Connection: keep-alive
   14 ReqEnd       c 1310276097 1206687639.357743979 1206687639.359473944 0.001337051 0.001684904 0.000045061
    0 StatAddr     - xxx.xxx.xxx.xxx 0 0 1 1 0 0 1 291 6
   14 SessionClose c no request
   14 StatSess     c xxx.xxx.xxx.xxx 11851 0 1 1 0 0 1 291 6
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1206687640


Hehe, problem solved. It looks like our admin
configured our firewall a little bit to restrictive.
The header is in the response, but it gets filtered
out firewall.
One thing left: The "Transfer-Encoding" is still missing
in the response.

Kind regards

Flo



More information about the varnish-misc mailing list