On Fri, Sep 24, 2010 at 11:48:16AM +0700, Dang Tung wrote:
> Thanks for fast reply,
>
> but I pasted wrong, actually when I remove these block, it doesn't work
>
> sub vcl_fetch {
> if (beresp.status == 301 || beresp.status == 302)
> {
> set beresp.http.Location = regsub(beresp.http.Location,
> "^(\w+://[^/]+):\d+", "\1");
> }
> }
Hmm. Can you provide the headers of one of the URLs you're testing, with
as little anonymisation as possible? e.g. using
wget -S -O /dev/null http://www.example.com/
Is it possible that your test URL is already cached by Varnish?
vcl_fetch() is only called when the resource was fetched from the
backend, so if it was already cached by Varnish that code will never be
called. Either purge the URL or add similar code in vcl_hit().
_______________________________________________
varnish-misc mailing list
[email protected]
http://lists.varnish-cache.org/mailman/listinfo/varnish-misc