Search
j0ke.net Open Build Service
>
Projects
>
ha
>
varnish2
> varnishncsa-vhost-2.1.4.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File varnishncsa-vhost-2.1.4.patch of Package varnish2 (Revision 41)
Currently displaying revision
41
,
show latest
--- bin/varnishncsa/varnishncsa.c.orig 2010-10-21 10:57:22.000000000 +0200 +++ bin/varnishncsa/varnishncsa.c 2010-10-25 19:49:07.791038120 +0200 @@ -102,6 +102,7 @@ static size_t nll; static int prefer_x_forwarded_for = 0; +static int print_virtualhost = 0; static int isprefix(const char *str, const char *prefix, const char *end, @@ -470,6 +471,8 @@ fo = priv; /* %h */ + if (lp->df_Host && print_virtualhost) + fprintf(fo, "%s ", lp->df_Host); if (!lp->df_h && spec & VSL_S_BACKEND) fprintf(fo, "127.0.0.1 "); else if (lp->df_X_Forwarded_For && prefer_x_forwarded_for) @@ -568,7 +571,7 @@ { fprintf(stderr, - "usage: varnishncsa %s [-aDV] [-n varnish_name] " + "usage: varnishncsa %s [-aDvV] [-n varnish_name] " "[-P file] [-w file]\n", VSL_USAGE); exit(1); } @@ -587,7 +590,7 @@ vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "aDn:P:Vw:f")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "aDn:P:Vw:fv")) != -1) { switch (c) { case 'a': a_flag = 1; @@ -604,6 +607,9 @@ case 'P': P_arg = optarg; break; + case 'v': + print_virtualhost = 1; + break; case 'V': varnish_version("varnishncsa"); exit(0);