Hi Jeff. On 12.10.2011 06:01, Stroomer, Jeff wrote:
> I've seen plenty of example vcl code that seems to say req.url will contain /a/b/c. > But it looks like I'm actually getting the full URL, i.e., > http://xyz.com/a/b/c. If you see that in each and every request, I'd suspect another reverse proxy or load balancer at your end. I see this request format, too, occasionally, but I haven't tried to figure out which browsers/bot actually cause it. I use this code in vcl_recv() to normalize the URL: # fix "GET http://host/path" request # extract Host: header and rewrite URL if (req.url ~ "(?i)^https?://") { set req.http.Host = regsub(req.url, "(?i)^https?://([^/]*).*", "\1"); set req.url = regsub(req.url, "(?i)^https?://[^/]*/?(.*)$", "/\1"); } ( http://cfg.openchaos.org/varnish/vcl/3.x/common/normalize_http.vcl ) Hauke.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
