Skip to content
Snippets Groups Projects
Commit f6e40fd2 authored by Craig Tiller's avatar Craig Tiller
Browse files

Add compression algorithms to static metadata

parent ed43f51f
No related branches found
No related tags found
No related merge requests found
......@@ -49,27 +49,91 @@ grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
const gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT *
2] = {
9, 28, 8, 28, 10, 28, 10, 40, 11, 28, 12, 28, 13, 28, 14, 28, 15, 28, 16,
28, 17, 28, 18, 28, 19, 28, 20, 28, 21, 28, 22, 28, 23, 28, 24, 28, 25, 28,
26, 28, 27, 28, 29, 28, 30, 28, 31, 28, 32, 28, 38, 0, 41, 28, 44, 28, 45,
28, 46, 28, 47, 28, 48, 28, 49, 28, 50, 28, 51, 28, 52, 28, 53, 33, 53, 55,
54, 65, 54, 66, 56, 28, 57, 28, 58, 28, 59, 28, 60, 28, 61, 28, 62, 34, 62,
42, 62, 43, 63, 28, 64, 28, 67, 1, 67, 2, 67, 3, 67, 4, 67, 5, 67, 6,
67, 7, 68, 28, 69, 70, 71, 28, 72, 28, 73, 28, 74, 28, 75, 28};
9, 29, 8, 29, 10, 29, 10, 42, 11, 29, 12, 29, 13, 29, 14, 29, 15, 29, 16,
29, 17, 29, 18, 29, 19, 29, 20, 29, 21, 29, 22, 29, 23, 29, 24, 29, 25, 29,
26, 29, 27, 29, 30, 29, 31, 29, 32, 29, 33, 29, 39, 0, 43, 29, 47, 29, 48,
29, 49, 29, 50, 29, 51, 29, 52, 29, 53, 29, 54, 29, 55, 29, 56, 34, 56, 58,
57, 68, 57, 69, 59, 29, 60, 29, 61, 29, 62, 29, 63, 29, 64, 29, 65, 35, 65,
44, 65, 45, 66, 29, 67, 29, 70, 1, 70, 2, 70, 3, 70, 4, 70, 5, 70, 6,
70, 7, 71, 29, 72, 73, 74, 29, 75, 29, 76, 29, 77, 29, 78, 29};
const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"0", "200", "204", "206", "304", "400", "404", "500", "accept",
"accept-charset", "accept-encoding", "accept-language", "accept-ranges",
"access-control-allow-origin", "age", "allow", ":authority",
"authorization", "cache-control", "content-disposition", "content-encoding",
"content-language", "content-length", "content-location", "content-range",
"content-type", "cookie", "date", "", "etag", "expect", "expires", "from",
"GET", "grpc", "grpc-accept-encoding", "grpc-encoding", "grpc-message",
"grpc-status", "grpc-timeout", "gzip, deflate", "host", "http", "https",
"if-match", "if-modified-since", "if-none-match", "if-range",
"if-unmodified-since", "last-modified", "link", "location", "max-forwards",
":method", ":path", "POST", "proxy-authenticate", "proxy-authorization",
"range", "referer", "refresh", "retry-after", ":scheme", "server",
"set-cookie", "/", "/index.html", ":status", "strict-transport-security",
"te", "trailers", "transfer-encoding", "user-agent", "vary", "via",
"0",
"200",
"204",
"206",
"304",
"400",
"404",
"500",
"accept",
"accept-charset",
"accept-encoding",
"accept-language",
"accept-ranges",
"access-control-allow-origin",
"age",
"allow",
":authority",
"authorization",
"cache-control",
"content-disposition",
"content-encoding",
"content-language",
"content-length",
"content-location",
"content-range",
"content-type",
"cookie",
"date",
"deflate",
"",
"etag",
"expect",
"expires",
"from",
"GET",
"grpc",
"grpc-accept-encoding",
"grpc-encoding",
"grpc-message",
"grpc-status",
"grpc-timeout",
"gzip",
"gzip, deflate",
"host",
"http",
"https",
"identity",
"if-match",
"if-modified-since",
"if-none-match",
"if-range",
"if-unmodified-since",
"last-modified",
"link",
"location",
"max-forwards",
":method",
":path",
"POST",
"proxy-authenticate",
"proxy-authorization",
"range",
"referer",
"refresh",
"retry-after",
":scheme",
"server",
"set-cookie",
"/",
"/index.html",
":status",
"strict-transport-security",
"te",
"trailers",
"transfer-encoding",
"user-agent",
"vary",
"via",
"www-authenticate"};
......@@ -46,7 +46,7 @@
#include "src/core/transport/metadata.h"
#define GRPC_STATIC_MDSTR_COUNT 76
#define GRPC_STATIC_MDSTR_COUNT 79
extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
/* "0" */
#define GRPC_MDSTR_0 (&grpc_static_mdstr_table[0])
......@@ -104,102 +104,108 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
#define GRPC_MDSTR_COOKIE (&grpc_static_mdstr_table[26])
/* "date" */
#define GRPC_MDSTR_DATE (&grpc_static_mdstr_table[27])
/* "deflate" */
#define GRPC_MDSTR_DEFLATE (&grpc_static_mdstr_table[28])
/* "" */
#define GRPC_MDSTR_EMPTY (&grpc_static_mdstr_table[28])
#define GRPC_MDSTR_EMPTY (&grpc_static_mdstr_table[29])
/* "etag" */
#define GRPC_MDSTR_ETAG (&grpc_static_mdstr_table[29])
#define GRPC_MDSTR_ETAG (&grpc_static_mdstr_table[30])
/* "expect" */
#define GRPC_MDSTR_EXPECT (&grpc_static_mdstr_table[30])
#define GRPC_MDSTR_EXPECT (&grpc_static_mdstr_table[31])
/* "expires" */
#define GRPC_MDSTR_EXPIRES (&grpc_static_mdstr_table[31])
#define GRPC_MDSTR_EXPIRES (&grpc_static_mdstr_table[32])
/* "from" */
#define GRPC_MDSTR_FROM (&grpc_static_mdstr_table[32])
#define GRPC_MDSTR_FROM (&grpc_static_mdstr_table[33])
/* "GET" */
#define GRPC_MDSTR_GET (&grpc_static_mdstr_table[33])
#define GRPC_MDSTR_GET (&grpc_static_mdstr_table[34])
/* "grpc" */
#define GRPC_MDSTR_GRPC (&grpc_static_mdstr_table[34])
#define GRPC_MDSTR_GRPC (&grpc_static_mdstr_table[35])
/* "grpc-accept-encoding" */
#define GRPC_MDSTR_GRPC_ACCEPT_ENCODING (&grpc_static_mdstr_table[35])
#define GRPC_MDSTR_GRPC_ACCEPT_ENCODING (&grpc_static_mdstr_table[36])
/* "grpc-encoding" */
#define GRPC_MDSTR_GRPC_ENCODING (&grpc_static_mdstr_table[36])
#define GRPC_MDSTR_GRPC_ENCODING (&grpc_static_mdstr_table[37])
/* "grpc-message" */
#define GRPC_MDSTR_GRPC_MESSAGE (&grpc_static_mdstr_table[37])
#define GRPC_MDSTR_GRPC_MESSAGE (&grpc_static_mdstr_table[38])
/* "grpc-status" */
#define GRPC_MDSTR_GRPC_STATUS (&grpc_static_mdstr_table[38])
#define GRPC_MDSTR_GRPC_STATUS (&grpc_static_mdstr_table[39])
/* "grpc-timeout" */
#define GRPC_MDSTR_GRPC_TIMEOUT (&grpc_static_mdstr_table[39])
#define GRPC_MDSTR_GRPC_TIMEOUT (&grpc_static_mdstr_table[40])
/* "gzip" */
#define GRPC_MDSTR_GZIP (&grpc_static_mdstr_table[41])
/* "gzip, deflate" */
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (&grpc_static_mdstr_table[40])
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (&grpc_static_mdstr_table[42])
/* "host" */
#define GRPC_MDSTR_HOST (&grpc_static_mdstr_table[41])
#define GRPC_MDSTR_HOST (&grpc_static_mdstr_table[43])
/* "http" */
#define GRPC_MDSTR_HTTP (&grpc_static_mdstr_table[42])
#define GRPC_MDSTR_HTTP (&grpc_static_mdstr_table[44])
/* "https" */
#define GRPC_MDSTR_HTTPS (&grpc_static_mdstr_table[43])
#define GRPC_MDSTR_HTTPS (&grpc_static_mdstr_table[45])
/* "identity" */
#define GRPC_MDSTR_IDENTITY (&grpc_static_mdstr_table[46])
/* "if-match" */
#define GRPC_MDSTR_IF_MATCH (&grpc_static_mdstr_table[44])
#define GRPC_MDSTR_IF_MATCH (&grpc_static_mdstr_table[47])
/* "if-modified-since" */
#define GRPC_MDSTR_IF_MODIFIED_SINCE (&grpc_static_mdstr_table[45])
#define GRPC_MDSTR_IF_MODIFIED_SINCE (&grpc_static_mdstr_table[48])
/* "if-none-match" */
#define GRPC_MDSTR_IF_NONE_MATCH (&grpc_static_mdstr_table[46])
#define GRPC_MDSTR_IF_NONE_MATCH (&grpc_static_mdstr_table[49])
/* "if-range" */
#define GRPC_MDSTR_IF_RANGE (&grpc_static_mdstr_table[47])
#define GRPC_MDSTR_IF_RANGE (&grpc_static_mdstr_table[50])
/* "if-unmodified-since" */
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[48])
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[51])
/* "last-modified" */
#define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[49])
#define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[52])
/* "link" */
#define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[50])
#define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[53])
/* "location" */
#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[51])
#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[54])
/* "max-forwards" */
#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[52])
#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[55])
/* ":method" */
#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[53])
#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[56])
/* ":path" */
#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[54])
#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[57])
/* "POST" */
#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[55])
#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[58])
/* "proxy-authenticate" */
#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[56])
#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[59])
/* "proxy-authorization" */
#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[57])
#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[60])
/* "range" */
#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[58])
#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[61])
/* "referer" */
#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[59])
#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[62])
/* "refresh" */
#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[60])
#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[63])
/* "retry-after" */
#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[61])
#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[64])
/* ":scheme" */
#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[62])
#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[65])
/* "server" */
#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[63])
#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[66])
/* "set-cookie" */
#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[64])
#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[67])
/* "/" */
#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[65])
#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[68])
/* "/index.html" */
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[66])
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[69])
/* ":status" */
#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[67])
#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[70])
/* "strict-transport-security" */
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[68])
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[71])
/* "te" */
#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[69])
#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[72])
/* "trailers" */
#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[70])
#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[73])
/* "transfer-encoding" */
#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[71])
#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[74])
/* "user-agent" */
#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[72])
#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[75])
/* "vary" */
#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[73])
#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[76])
/* "via" */
#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[74])
#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[77])
/* "www-authenticate" */
#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[75])
#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[78])
#define GRPC_STATIC_MDELEM_COUNT 65
extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
......
......@@ -49,6 +49,9 @@ CONFIG = [
'host',
'grpc-message',
'grpc-status',
'gzip',
'deflate',
'identity',
'',
('grpc-status', '0'),
('te', 'trailers'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment