|
@@ -0,0 +1,48 @@
+--- bin/varnishncsa/varnishncsa.c.orig 2011-07-02 22:11:26.843623201 +0200
++++ bin/varnishncsa/varnishncsa.c 2011-07-02 22:18:06.336220163 +0200
+@@ -107,6 +107,8 @@
+
+ static size_t nll;
+
++static int print_virtualhost = 0;
++
+ static int m_flag = 0;
+
+ static const char *format;
+@@ -554,6 +556,8 @@
+ break;
+
+ case '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
+@@ -710,7 +714,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);
+ }
+@@ -729,7 +733,7 @@
+ vd = VSM_New();
+ VSL_Setup(vd);
+
+- while ((c = getopt(argc, argv, VSL_ARGS "aDP:Vw:fF:")) != -1) {
++ while ((c = getopt(argc, argv, VSL_ARGS "aDP:Vw:fvF:")) != -1) {
+ switch (c) {
+ case 'a':
+ a_flag = 1;
+@@ -756,6 +760,9 @@
+ case 'P':
+ P_arg = optarg;
+ break;
++ case 'v':
++ print_virtualhost = 1;
++ break;
+ case 'V':
+ VCS_Message("varnishncsa");
+ exit(0);
|