-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 3/2/11 12:56 PM, Dmitry Panov wrote: > > Thanks for the patch. I have tried it and it appears to be working. I've > just spotted one problem so far: it looks like the gziped flag is not > copied from the stale object it is possible to serve gziped object to a > client that doesn't support it. I'm new to varnish and I'm not familiar > with the code yet, but the following patch solved the problem for me: > > --- cache_http.c.orig 2011-03-02 11:51:10.000000000 +0000 > +++ cache_http.c 2011-03-02 11:05:20.000000000 +0000 > @@ -988,6 +988,7 @@ > http_SetResp(o->http, "HTTP/1.1", 200, "OK Not Modified"); > http_SetH(o->http, HTTP_HDR_REQ, "GET"); > http_copyh(o->http, sp->wrk->bereq, HTTP_HDR_URL); > + sp->obj->gziped = o_stale->gziped; > > break;
Good catch, thanks, I've extended the test cases to make sure this works right from now on. Will be available in the next version. This is a good point, we may have overlooked fields from struct object that have to be copied over from stale_obj. We'll take a closer look; and anyone who's testing the patch might want to keep an eye out for something similar. Best, Geoff - -- UPLEX Systemoptimierung Schwanenwik 24 22087 Hamburg http://uplex.de/ Mob: +49-176-63690917 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCAAGBQJNbl70AAoJEOUwvh9pJNUR4RsP/3kgbnXhOaqxo+9pY/2KcMbb 30xoDjAa0gNa7HyKcv7lXVfoagS1ZFe6bZ99/iFXXBpJydWkOchjiz50rI3fL5n4 x+8Wbf/nTaCvoVNguuDIt96qSW37wSl7L3gUN4PotFzykn7Rhq+p4gKjjcQQmfsu IeHUw0+07KvgbPyaEtWTOBer27cK16GTyokvshwGMkJaaaKSBccj/AjP17+1SHu1 mxqUZmsx2/qUejK+2h9+w0G7/WBPuJXv3ZUf56ul/k8xQfAaOBeIMiwqgMJEibUE Vuh3UHFszOU0CiTo5A7cyzr1k2WzlTT54oEwGJJm6Y1+wmhLejtTnmseagJDgJfU plumAIKaJM/7csqvu5KAbg9MfuYqMQPxcjd1TOoQOFI6I7j3I5ZgoL4JWMeqQx8l XFaZYmuzlK2ir0NO5MW+kYWbTgzz4+fBVz49V2bRH5JveNSttP5mKROHTuWbprFb PZgyZD+07sdBmMuDSFOQh1yBHHtUNdMfkFXpDtHXAg8r5isJugEiM0isOCMnEmmC 0UrMrOnTYrS+93P8tTG9M315BhiV+jFmHvwhSO5ogcmCsu8MbbzR8xDhJEAct9/M HlEvM/6D6zPqDTqoO/Nj88OqzrXdZp+Rp/4haDoQ+sBEDH5M/sxoJInq3bAjZ/Rg KRPGvHcYHAIa5DlfAfRa =4kLh -----END PGP SIGNATURE----- _______________________________________________ varnish-dev mailing list [email protected] http://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
