[master] 46c0c37 Fix wrong argument order when picking the Host header.
    Martin Blix Grydeland 
    martin at varnish-software.com
       
    Mon Dec  9 13:21:51 CET 2013
    
    
  
commit 46c0c379572d5dee5bc345f3aaf3bf83b16eac39
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Mon Dec 9 12:41:33 2013 +0100
    Fix wrong argument order when picking the Host header.
    
    Fix wrong argument order for isprefix() when picking the Host
    header. This caused the header to never be matched.
    
    Fixes: #1383
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 452cc70..b97d667 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -776,7 +776,7 @@ dispatch_f(struct VSL_data *vsl, struct VSL_transaction * const pt[],
 				    0, NULL);
 				break;
 			case SLT_ReqHeader:
-				if (isprefix(b, e, "Host:", &p))
+				if (isprefix(b, "Host:", e, &p))
 					frag_line(p, e, &CTX.frag[F_host]);
 				else if (isprefix(b, "Authorization:", e, &p) &&
 				    isprefix(p, "basic", e, &p))
    
    
More information about the varnish-commit
mailing list