From ca44f3dbdfc327c11fe74d99527bf86b1afa9c1a Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 3 Apr 2006 07:14:24 +0000 Subject: [PATCH] Add 5 dummy fields to the http headers, we will need them subsequently. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@93 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_httpd.c | 4 +- varnish-cache/include/http_headers.h | 42 ++++++++++----------- varnish-cache/include/shmlog_tags.h | 2 +- varnish-cache/include/vcl_lang.h | 2 +- varnish-cache/lib/libvcl/vcl_fixed_token.c | 44 +++++++++++----------- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_httpd.c b/varnish-cache/bin/varnishd/cache_httpd.c index 4e68c90f..cf6f4756 100644 --- a/varnish-cache/bin/varnishd/cache_httpd.c +++ b/varnish-cache/bin/varnishd/cache_httpd.c @@ -55,7 +55,7 @@ HttpdAnalyze(struct sess *sp) if (*p == '\r') p++; -#define HTTPH(a, b) sp->b = NULL; +#define HTTPH(a, b, c, d, e, f, g) sp->b = NULL; #include "http_headers.h" #undef HTTPH @@ -77,7 +77,7 @@ HttpdAnalyze(struct sess *sp) continue; \ } -#define HTTPH(a, b) W(a ":", b, p, q, sp) +#define HTTPH(a, b, c, d, e, f, g) W(a ":", b, p, q, sp) #include "http_headers.h" #undef HTTPH #undef W diff --git a/varnish-cache/include/http_headers.h b/varnish-cache/include/http_headers.h index 174d46d2..152c5879 100644 --- a/varnish-cache/include/http_headers.h +++ b/varnish-cache/include/http_headers.h @@ -2,24 +2,24 @@ * $Id$ */ -HTTPH("Accept-Charset", H_Accept_Charset) -HTTPH("Accept-Encoding", H_Accept_Encoding) -HTTPH("Accept-Language", H_Accept_Language) -HTTPH("Accept", H_Accept) -HTTPH("Authorization", H_Authorization) -HTTPH("Connection", H_Connection) -HTTPH("Expect", H_Expect) -HTTPH("From", H_From) -HTTPH("Host", H_Host) -HTTPH("If-Match", H_If_Match) -HTTPH("If-Modified-Since", H_If_Modified_Since) -HTTPH("If-None-Match", H_If_None_Match) -HTTPH("If-Range", H_If_Range) -HTTPH("If-Unmodified-Since", H_If_Unmodifed_Since) -HTTPH("Keep-Alive", H_Keep_Alive) -HTTPH("Max-Forwards", H_Max_Forwards) -HTTPH("Proxy-Authorization", H_Proxy_Authorization) -HTTPH("Range", H_Range) -HTTPH("Referer", H_Referer) -HTTPH("TE", H_TE) -HTTPH("User-Agent", H_User_Agent) +HTTPH("Accept-Charset", H_Accept_Charset, 0, 0, 0, 0, 0) +HTTPH("Accept-Encoding", H_Accept_Encoding, 0, 0, 0, 0, 0) +HTTPH("Accept-Language", H_Accept_Language, 0, 0, 0, 0, 0) +HTTPH("Accept", H_Accept, 0, 0, 0, 0, 0) +HTTPH("Authorization", H_Authorization, 0, 0, 0, 0, 0) +HTTPH("Connection", H_Connection, 0, 0, 0, 0, 0) +HTTPH("Expect", H_Expect, 0, 0, 0, 0, 0) +HTTPH("From", H_From, 0, 0, 0, 0, 0) +HTTPH("Host", H_Host, 0, 0, 0, 0, 0) +HTTPH("If-Match", H_If_Match, 0, 0, 0, 0, 0) +HTTPH("If-Modified-Since", H_If_Modified_Since, 0, 0, 0, 0, 0) +HTTPH("If-None-Match", H_If_None_Match, 0, 0, 0, 0, 0) +HTTPH("If-Range", H_If_Range, 0, 0, 0, 0, 0) +HTTPH("If-Unmodified-Since", H_If_Unmodifed_Since, 0, 0, 0, 0, 0) +HTTPH("Keep-Alive", H_Keep_Alive, 0, 0, 0, 0, 0) +HTTPH("Max-Forwards", H_Max_Forwards, 0, 0, 0, 0, 0) +HTTPH("Proxy-Authorization", H_Proxy_Authorization, 0, 0, 0, 0, 0) +HTTPH("Range", H_Range, 0, 0, 0, 0, 0) +HTTPH("Referer", H_Referer, 0, 0, 0, 0, 0) +HTTPH("TE", H_TE, 0, 0, 0, 0, 0) +HTTPH("User-Agent", H_User_Agent, 0, 0, 0, 0, 0) diff --git a/varnish-cache/include/shmlog_tags.h b/varnish-cache/include/shmlog_tags.h index e251ef75..2522e9e4 100644 --- a/varnish-cache/include/shmlog_tags.h +++ b/varnish-cache/include/shmlog_tags.h @@ -14,6 +14,6 @@ SLTM(Request) SLTM(URL) SLTM(Protocol) SLTM(H_Unknown) -#define HTTPH(a, b) SLTM(b) +#define HTTPH(a, b, c, d, e, f, g) SLTM(b) #include "http_headers.h" #undef HTTPH diff --git a/varnish-cache/include/vcl_lang.h b/varnish-cache/include/vcl_lang.h index 4af3e8df..ee3a3f61 100644 --- a/varnish-cache/include/vcl_lang.h +++ b/varnish-cache/include/vcl_lang.h @@ -37,7 +37,7 @@ struct sess { const char *req_b; const char *url_b; const char *proto_b; -#define HTTPH(a, b) const char *b; +#define HTTPH(a, b, c, d, e, f, g) const char *b; #include #undef HTTPH diff --git a/varnish-cache/lib/libvcl/vcl_fixed_token.c b/varnish-cache/lib/libvcl/vcl_fixed_token.c index c05f0efc..47506cb2 100644 --- a/varnish-cache/lib/libvcl/vcl_fixed_token.c +++ b/varnish-cache/lib/libvcl/vcl_fixed_token.c @@ -418,32 +418,32 @@ vcl_output_lang_h(FILE *f) fputs(" const char *req_b;\n", f); fputs(" const char *url_b;\n", f); fputs(" const char *proto_b;\n", f); - fputs("#define HTTPH(a, b) const char *b;\n", f); + fputs("#define HTTPH(a, b, c, d, e, f, g) const char *b;\n", f); fputs("/*\n", f); fputs(" * $Id$\n", f); fputs(" */\n", f); fputs("\n", f); - fputs("HTTPH(\"Accept-Charset\", H_Accept_Charset)\n", f); - fputs("HTTPH(\"Accept-Encoding\", H_Accept_Encoding)\n", f); - fputs("HTTPH(\"Accept-Language\", H_Accept_Language)\n", f); - fputs("HTTPH(\"Accept\", H_Accept)\n", f); - fputs("HTTPH(\"Authorization\", H_Authorization)\n", f); - fputs("HTTPH(\"Connection\", H_Connection)\n", f); - fputs("HTTPH(\"Expect\", H_Expect)\n", f); - fputs("HTTPH(\"From\", H_From)\n", f); - fputs("HTTPH(\"Host\", H_Host)\n", f); - fputs("HTTPH(\"If-Match\", H_If_Match)\n", f); - fputs("HTTPH(\"If-Modified-Since\", H_If_Modified_Since)\n", f); - fputs("HTTPH(\"If-None-Match\", H_If_None_Match)\n", f); - fputs("HTTPH(\"If-Range\", H_If_Range)\n", f); - fputs("HTTPH(\"If-Unmodified-Since\", H_If_Unmodifed_Since)\n", f); - fputs("HTTPH(\"Keep-Alive\", H_Keep_Alive)\n", f); - fputs("HTTPH(\"Max-Forwards\", H_Max_Forwards)\n", f); - fputs("HTTPH(\"Proxy-Authorization\", H_Proxy_Authorization)\n", f); - fputs("HTTPH(\"Range\", H_Range)\n", f); - fputs("HTTPH(\"Referer\", H_Referer)\n", f); - fputs("HTTPH(\"TE\", H_TE)\n", f); - fputs("HTTPH(\"User-Agent\", H_User_Agent)\n", f); + fputs("HTTPH(\"Accept-Charset\", H_Accept_Charset, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Accept-Encoding\", H_Accept_Encoding, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Accept-Language\", H_Accept_Language, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Accept\", H_Accept, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Authorization\", H_Authorization, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Connection\", H_Connection, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Expect\", H_Expect, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"From\", H_From, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Host\", H_Host, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"If-Match\", H_If_Match, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"If-Modified-Since\", H_If_Modified_Since, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"If-None-Match\", H_If_None_Match, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"If-Range\", H_If_Range, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"If-Unmodified-Since\", H_If_Unmodifed_Since, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Keep-Alive\", H_Keep_Alive, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Max-Forwards\", H_Max_Forwards, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Proxy-Authorization\", H_Proxy_Authorization, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Range\", H_Range, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"Referer\", H_Referer, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"TE\", H_TE, 0, 0, 0, 0, 0)\n", f); + fputs("HTTPH(\"User-Agent\", H_User_Agent, 0, 0, 0, 0, 0)\n", f); fputs("#undef HTTPH\n", f); fputs("\n", f); fputs(" enum {\n", f); -- 2.39.5