400 return code on Content-length: 0.
David Martínez Moreno
ender at tuenti.com
Wed Oct 8 03:51:59 CEST 2008
El lunes, 6 de octubre de 2008, Poul-Henning Kamp escribió:
> Which version of varnish ?
2.0-beta1.
> Can you provide a varnishlog output for such a transaction ?
Of course:
0 CLI - Rd ping
0 CLI - Wr 0 200 PONG 1223430225 1.0
9 SessionOpen c 88.28.44.79 49601 0.0.0.0:90
0 CLI - Rd ping
0 CLI - Wr 0 200 PONG 1223430228 1.0
9 ReqStart c 88.28.44.79 49601 259527650
9 HttpGarbage c GET /j/foo.gif
Host: foo.tuenti.com
Content-length: 0
9 VCL_call c error
9 VCL_return c deliver
9 Length c 428
9 VCL_call c deliver
9 VCL_return c deliver
9 TxProtocol c HTTP/1.1
9 TxStatus c 400
9 TxResponse c Bad Request
9 TxHeader c Server: Varnish
9 TxHeader c Retry-After: 0
9 TxHeader c Content-Type: text/html; charset=utf-8
9 TxHeader c Content-Length: 428
9 TxHeader c Date: Wed, 08 Oct 2008 01:43:49 GMT
9 TxHeader c X-Varnish: 259527650
9 TxHeader c Age: 0
9 TxHeader c Via: 1.1 varnish
9 TxHeader c Connection: keep-alive
9 ReqEnd c 259527650 1223430229.306536674 1223430229.306603670
2.370194197 0.000043154 0.000023842
0 StatAddr - 88.28.44.79 0 19 2 1 0 0 0 231 0
0 CLI - Rd ping
0 CLI - Wr 0 200 PONG 1223430231 1.0
9 SessionClose c no request
9 StatSess c 88.28.44.79 49601 2 1 1 0 0 0 231 0
I've tried also to remove such header in vcl_fetch, as such header seemed not
to be reachable in vcl_recv (varnishd told me when I tried):
sub vcl_fetch {
if (obj.http.Content-length == "0") {
remove obj.http.Content-length;
}
if (!obj.cacheable) {
...
That's the only deviation apart from the usual trick for serving content
without checking with backend:
# if (req.http.Authorization || req.http.Cookie) {
if (req.http.Authorization) {
from the shipped default.vcl file.
Thanks in advance,
Ender.
--
- ¿Cuál es el futuro perfecto de AMAR?
- ¡Hijitos!
-- Susanita (Mafalda).
--
Responsable de sistemas
tuenti.com
More information about the varnish-misc
mailing list