/[gentoo-x86]/www-servers/varnish/files/varnish-2.1.4-virtual-ncsa.patch
Gentoo

Contents of /www-servers/varnish/files/varnish-2.1.4-virtual-ncsa.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Oct 21 21:43:30 2010 UTC (3 years, 11 months ago) by bangert
Branch: MAIN
version bump (#313377)

(Portage version: 2.2_rc98/cvs/Linux i686)

1 diff -Naur varnish-2.1.4.orig/bin/varnishncsa/varnishncsa.c varnish-2.1.4/bin/varnishncsa/varnishncsa.c
2 --- varnish-2.1.4.orig/bin/varnishncsa/varnishncsa.c 2010-10-21 17:45:41.000000000 +0200
3 +++ varnish-2.1.4/bin/varnishncsa/varnishncsa.c 2010-10-21 22:42:50.000000000 +0200
4 @@ -102,6 +102,7 @@
5
6 static size_t nll;
7 static int prefer_x_forwarded_for = 0;
8 +static int virtual_host_style_logging = 0;
9
10 static int
11 isprefix(const char *str, const char *prefix, const char *end,
12 @@ -469,6 +470,11 @@
13
14 fo = priv;
15
16 + /* the -v option */
17 + if (virtual_host_style_logging) {
18 + fprintf(fo, "%s ", lp->df_Host);
19 + }
20 +
21 /* %h */
22 if (!lp->df_h && spec & VSL_S_BACKEND)
23 fprintf(fo, "127.0.0.1 ");
24 @@ -508,7 +514,7 @@
25 * normalized the request URL.
26 */
27 fprintf(fo, "\"%s ", lp->df_m);
28 - if (lp->df_Host) {
29 + if (!virtual_host_style_logging && lp->df_Host) {
30 if (strncmp(lp->df_Host, "http://", 7) != 0)
31 fprintf(fo, "http://");
32 fprintf(fo, "%s", lp->df_Host);
33 @@ -568,7 +574,7 @@
34 {
35
36 fprintf(stderr,
37 - "usage: varnishncsa %s [-aDV] [-n varnish_name] "
38 + "usage: varnishncsa %s [-avDV] [-n varnish_name] "
39 "[-P file] [-w file]\n", VSL_USAGE);
40 exit(1);
41 }
42 @@ -587,11 +593,14 @@
43
44 vd = VSL_New();
45
46 - while ((c = getopt(argc, argv, VSL_ARGS "aDn:P:Vw:f")) != -1) {
47 + while ((c = getopt(argc, argv, VSL_ARGS "avDn:P:Vw:f")) != -1) {
48 switch (c) {
49 case 'a':
50 a_flag = 1;
51 break;
52 + case 'v':
53 + virtual_host_style_logging = 1;
54 + break;
55 case 'f':
56 prefer_x_forwarded_for = 1;
57 break;

  ViewVC Help
Powered by ViewVC 1.1.20