Removed the "ViaHeader" directive and replaced it with the
"ViaProxyName" directive. The "Via" HTTP header is _required_ by the HTTP spec, so the code has been changed to always send the header. However, including the proxy's host name could be considered a security threat, so the "ViaProxyName" directive is used to set the token sent in the "Via" header. If the directive is not enabled the proxy's host name will be used.
This commit is contained in:
1 parent
0d3962f1f0
commit
4c9141aac6
5 files changed
+47
-44
No files matched your search
+5
-4
@@ -1,4 +1,4 @@
|
||||
/* $Id: scanner.l,v 1.19 2003-03-13 21:42:45 rjkaes Exp $
|
||||
/* $Id: scanner.l,v 1.20 2003-06-20 17:02:13 rjkaes Exp $
|
||||
*
|
||||
* This builds the scanner for the tinyproxy configuration file. This
|
||||
* file needs to stay in sync with grammar.y. If someone knows lex and yacc
|
||||
@@ -54,7 +54,7 @@ static struct keyword keywords[] = {
|
||||
{ "deny", KW_DENY },
|
||||
{ "connectport", KW_CONNECTPORT },
|
||||
{ "bind", KW_BIND },
|
||||
{ "viaheader", KW_HTTP_VIA },
|
||||
{ "viaproxyname", KW_VIA_PROXY_NAME },
|
||||
{ "stathost", KW_STATHOST },
|
||||
{ "errorfile", KW_ERRORPAGE },
|
||||
{ "defaulterrorfile", KW_DEFAULT_ERRORPAGE },
|
||||
@@ -81,7 +81,8 @@ static struct keyword keywords[] = {
|
||||
|
||||
#define MAX_REGEXP_LEN 1024
|
||||
|
||||
unsigned int yylineno = 1;
|
||||
unsigned int scanner_lineno = 1;
|
||||
|
||||
char tiny_buf[MAX_REGEXP_LEN];
|
||||
char *tiny_str;
|
||||
|
||||
@@ -103,7 +104,7 @@ word [^ \#'"\(\)\{\}\\;\n\t,|\.]
|
||||
%%
|
||||
|
||||
\#.*$ ;
|
||||
\n { yylineno++; return '\n'; }
|
||||
\n { ++scanner_lineno; return '\n'; }
|
||||
: { return ':'; }
|
||||
{white}+ ;
|
||||
0x{digit}+ { yylval.num = strtol(yytext, NULL, 16); return NUMBER; }
|
||||
|
||||
Reference in new issue
Block a user