Commit a47e91da authored by Tollef Fog Heen's avatar Tollef Fog Heen

Add rudimentary -X support to varnishncsa

Avoid crashing if an -X parameter is passed, and skip any requests
where the URL or Host matches the -X parameter.
parent 4b474592
......@@ -624,6 +624,13 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
* Fake "%r". This would be a lot easier if Varnish
* normalized the request URL.
*/
if (!lp->df_m ||
!req_header(lp, "Host") ||
!lp->df_U ||
!lp->df_H) {
clean_logline(lp);
return (reopen);
}
VSB_cat(os, lp->df_m);
VSB_putc(os, ' ');
if (req_header(lp, "Host")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment