summaryrefslogtreecommitdiffhomepage
path: root/src/grammar.y
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-11-26 21:44:43 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-11-26 21:44:43 +0000
commite58343012fa999a33ed2bcfd569fbbe3e861d0a1 (patch)
tree4b66b79746a3ec8a9fced14034db0fbe481425c8 /src/grammar.y
parentc826b18437dfc460e0d360c375241ce65a7ef7f8 (diff)
Included code to disable the sending of the Via header. This is now
controlled by the ViaHeader configure directive.
Diffstat (limited to 'src/grammar.y')
-rw-r--r--src/grammar.y13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/grammar.y b/src/grammar.y
index cf28e9a..4131dd3 100644
--- a/src/grammar.y
+++ b/src/grammar.y
@@ -1,4 +1,4 @@
-/* $Id: grammar.y,v 1.16 2002-11-03 17:10:32 rjkaes Exp $
+/* $Id: grammar.y,v 1.17 2002-11-26 21:44:43 rjkaes Exp $
*
* This is the grammar for tinyproxy's configuration file. It needs to be
* in sync with scanner.l. If you know more about yacc and lex than I do
@@ -49,7 +49,7 @@ int yylex(void);
%token KW_ANONYMOUS KW_XTINYPROXY
%token KW_FILTER KW_FILTERURLS KW_FILTEREXTENDED KW_FILTER_DEFAULT_DENY
%token KW_UPSTREAM
-%token KW_CONNECTPORT KW_BIND
+%token KW_CONNECTPORT KW_BIND KW_HTTP_VIA
%token KW_ALLOW KW_DENY
/* yes/no switches */
@@ -179,6 +179,15 @@ statement
log_message(LOG_WARNING, "The 'Bind' directive can not be used with transparent proxy support. Ignoring the directive.");
#endif
}
+ | KW_HTTP_VIA yesno
+ {
+ if ($2) {
+ log_message(LOG_INFO, "Enabling HTTP Via header.");
+ config.via_http_header = TRUE;
+ } else {
+ config.via_http_header = FALSE;
+ }
+ }
;
loglevels