-
Notifications
You must be signed in to change notification settings - Fork 8
/
http_header_id.h
182 lines (173 loc) · 7.21 KB
/
http_header_id.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#ifndef __AIDS_HTTP_HEADER__
#define __AIDS_HTTP_HEADER__
#include "tire.h"
#define AIDS_URL_INTERNAL_ONLY 0
#define AIDS_HOST 1
#define AIDS_USER_AGENT 2
#define AIDS_REFERER 3
#define AIDS_SEQ_INTERNAL_ONLY 4
#define AIDS_PRAGMA 5
#define AIDS_ACCEPT 6
#define AIDS_COOKIE 7
#define AIDS_KEEP_ALIVE 8
#define AIDS_CACHE_CONTROL 9
#define AIDS_CONTENT_ENCODING 10
#define AIDS_CONTENT_LANGUAGE 11
#define AIDS_CONTENT_TYPE 12
#define AIDS_RANGE 13
#define AIDS_CONTENT_LENGTH 14
#define AIDS_CONNECTION 15
#define AIDS_DATE 16
#define AIDS_TRANSFER_ENCODING 17
#define AIDS_UPGRADE 18
#define AIDS_VIA 19
#define AIDS_ACCEPT_CHARSET 20
#define AIDS_ACCEPT_ENCODING 21
#define AIDS_ACCEPT_LANGUAGE 22
#define AIDS_AUTHORIZATION 23
#define AIDS_FROM 24
#define AIDS_IF_MODIFIED_SINCE 25
#define AIDS_IF_MATCH 26
#define AIDS_IF_NONE_MATCH 27
#define AIDS_IF_RANGE 28
#define AIDS_IF_UNMODIFIED_SINCE 29
#define AIDS_MAX_FORWARDS 30
#define AIDS_PROXY_AUTHORIZATION 31
#define AIDS_AGE 32
#define AIDS_LOCATION 33
#define AIDS_PROXY_AUTHENTICATE 34
#define AIDS_PUBLIC 35
#define AIDS_RETRY_AFTER 36
#define AIDS_SERVER 37
#define AIDS_VARY 38
#define AIDS_WARNING 39
#define AIDS_WWW_AUTHENTICATE 40
#define AIDS_ALLOW 41
#define AIDS_CONTENT_BASE 42
#define AIDS_CONTENT_LOCATION 43
#define AIDS_CONTENT_MD5 44
#define AIDS_CONTENT_RANGE 45
#define AIDS_ETAG 46
#define AIDS_EXPIRES 47
#define AIDS_LAST_MODIFIED 48
#define AIDS_VERSION 49
#define AIDS_STATUS 50
#define AIDS_Priv_INTERNAL_ONLY 51
#define AIDS_Ext_INTERNAL_ONLY 52
#define AIDS_Body_INTERNAL_ONLY 53
#define AIDS_Priv2_INTERNAL_ONLY 54
#define AIDS_Priv3_INTERNAL_ONLY 55
#define AIDS_X_REQUESTED_WITH 56
#define AIDS_SET_COOKIE 57
#define HTTP_HEADER_ID_MAX 58
#define AIDS_HOST_NAME "HOST"
#define AIDS_USER_AGENT_NAME "USER-AGENT"
#define AIDS_REFERER_NAME "REFERER"
#define AIDS_PRAGMA_NAME "PRAGMA"
#define AIDS_ACCEPT_NAME "ACCEPT"
#define AIDS_COOKIE_NAME "COOKIE"
#define AIDS_KEEP_ALIVE_NAME "KEEP-ALIVE"
#define AIDS_CACHE_CONTROL_NAME "CACHE-CONTROL"
#define AIDS_CONTENT_ENCODING_NAME "CONTENT-ENCODING"
#define AIDS_CONTENT_LANGUAGE_NAME "CONTENT-LANGUAGE"
#define AIDS_CONTENT_TYPE_NAME "CONTENT-TYPE"
#define AIDS_RANGE_NAME "RANGE"
#define AIDS_CONTENT_LENGTH_NAME "CONTENT-LENGTH"
#define AIDS_CONNECTION_NAME "CONNECTION"
#define AIDS_DATE_NAME "DATE"
#define AIDS_TRANSFER_ENCODING_NAME "TRANSFER-ENCODING"
#define AIDS_UPGRADE_NAME "UPGRADE"
#define AIDS_VIA_NAME "VIA"
#define AIDS_ACCEPT_CHARSET_NAME "ACCEPT-CHARSET"
#define AIDS_ACCEPT_ENCODING_NAME "ACCEPT-ENCODING"
#define AIDS_ACCEPT_LANGUAGE_NAME "ACCEPT-LANGUAGE"
#define AIDS_AUTHORIZATION_NAME "AUTHORIZATION"
#define AIDS_FROM_NAME "FROM"
#define AIDS_IF_MODIFIED_SINCE_NAME "IF-MODIFIED-SINCE"
#define AIDS_IF_MATCH_NAME "IF-MATCH"
#define AIDS_IF_NONE_MATCH_NAME "IF-NONE-MATCH"
#define AIDS_IF_RANGE_NAME "IF-RANGE"
#define AIDS_IF_UNMODIFIED_SINCE_NAME "IF-UNMODIFIED-SINCE"
#define AIDS_MAX_FORWARDS_NAME "MAX-FORWARDS"
#define AIDS_PROXY_AUTHORIZATION_NAME "PROXY-AUTHORIZATION"
#define AIDS_AGE_NAME "AGE"
#define AIDS_LOCATION_NAME "LOCATION"
#define AIDS_PROXY_AUTHENTICATE_NAME "PROXY-AUTHENTICATE"
#define AIDS_PUBLIC_NAME "PUBLIC"
#define AIDS_RETRY_AFTER_NAME "RETRY-AFTER"
#define AIDS_SERVER_NAME "SERVER"
#define AIDS_VARY_NAME "VARY"
#define AIDS_WARNING_NAME "WARNING"
#define AIDS_WWW_AUTHENTICATE_NAME "WWW-AUTHENTICATE"
#define AIDS_ALLOW_NAME "ALLOW"
#define AIDS_CONTENT_BASE_NAME "CONTENT-BASE"
#define AIDS_CONTENT_LOCATION_NAME "CONTENT-LOCATION"
#define AIDS_CONTENT_MD5_NAME "CONTENT-MD5"
#define AIDS_CONTENT_RANGE_NAME "CONTENT-RANGE"
#define AIDS_ETAG_NAME "ETAG"
#define AIDS_EXPIRES_NAME "EXPIRES"
#define AIDS_LAST_MODIFIED_NAME "LAST-MODIFIED"
#define AIDS_VERSION_NAME "VERSION"
#define AIDS_STATUS_NAME "STATUS"
#define AIDS_X_REQUESTED_WITH_NAME "X-REQUESTED-WITH"
#define AIDS_SET_COOKIE_NAME "SET-COOKIE"
#define AIDS_HTTPHEADER_INSERT_TIRE(x) { \
aids_InsertTire(x,AIDS_HOST_NAME,AIDS_HOST); \
aids_InsertTire(x,AIDS_USER_AGENT_NAME,AIDS_USER_AGENT); \
aids_InsertTire(x,AIDS_REFERER_NAME,AIDS_REFERER); \
aids_InsertTire(x,AIDS_PRAGMA_NAME,AIDS_PRAGMA); \
aids_InsertTire(x,AIDS_ACCEPT_NAME,AIDS_ACCEPT); \
aids_InsertTire(x,AIDS_COOKIE_NAME,AIDS_COOKIE); \
aids_InsertTire(x,AIDS_KEEP_ALIVE_NAME,AIDS_KEEP_ALIVE); \
aids_InsertTire(x,AIDS_CACHE_CONTROL_NAME,AIDS_CACHE_CONTROL); \
aids_InsertTire(x,AIDS_CONTENT_ENCODING_NAME,AIDS_CONTENT_ENCODING); \
aids_InsertTire(x,AIDS_CONTENT_LANGUAGE_NAME,AIDS_CONTENT_LANGUAGE); \
aids_InsertTire(x,AIDS_CONTENT_TYPE_NAME,AIDS_CONTENT_TYPE); \
aids_InsertTire(x,AIDS_RANGE_NAME,AIDS_RANGE); \
aids_InsertTire(x,AIDS_CONTENT_LENGTH_NAME,AIDS_CONTENT_LENGTH); \
aids_InsertTire(x,AIDS_CONNECTION_NAME,AIDS_CONNECTION); \
aids_InsertTire(x,AIDS_DATE_NAME,AIDS_DATE); \
aids_InsertTire(x,AIDS_TRANSFER_ENCODING_NAME,AIDS_TRANSFER_ENCODING); \
aids_InsertTire(x,AIDS_UPGRADE_NAME,AIDS_UPGRADE); \
aids_InsertTire(x,AIDS_VIA_NAME,AIDS_VIA); \
aids_InsertTire(x,AIDS_ACCEPT_CHARSET_NAME,AIDS_ACCEPT_CHARSET); \
aids_InsertTire(x,AIDS_ACCEPT_ENCODING_NAME,AIDS_ACCEPT_ENCODING); \
aids_InsertTire(x,AIDS_ACCEPT_LANGUAGE_NAME,AIDS_ACCEPT_LANGUAGE); \
aids_InsertTire(x,AIDS_AUTHORIZATION_NAME,AIDS_AUTHORIZATION); \
aids_InsertTire(x,AIDS_FROM_NAME,AIDS_FROM); \
aids_InsertTire(x,AIDS_IF_MODIFIED_SINCE_NAME,AIDS_IF_MODIFIED_SINCE); \
aids_InsertTire(x,AIDS_IF_MATCH_NAME,AIDS_IF_MATCH); \
aids_InsertTire(x,AIDS_IF_NONE_MATCH_NAME,AIDS_IF_NONE_MATCH); \
aids_InsertTire(x,AIDS_IF_RANGE_NAME,AIDS_IF_RANGE); \
aids_InsertTire(x,AIDS_IF_UNMODIFIED_SINCE_NAME,AIDS_IF_UNMODIFIED_SINCE); \
aids_InsertTire(x,AIDS_MAX_FORWARDS_NAME,AIDS_MAX_FORWARDS); \
aids_InsertTire(x,AIDS_PROXY_AUTHORIZATION_NAME,AIDS_PROXY_AUTHORIZATION); \
aids_InsertTire(x,AIDS_AGE_NAME,AIDS_AGE); \
aids_InsertTire(x,AIDS_LOCATION_NAME,AIDS_LOCATION); \
aids_InsertTire(x,AIDS_PROXY_AUTHENTICATE_NAME,AIDS_PROXY_AUTHENTICATE); \
aids_InsertTire(x,AIDS_PUBLIC_NAME,AIDS_PUBLIC); \
aids_InsertTire(x,AIDS_RETRY_AFTER_NAME,AIDS_RETRY_AFTER); \
aids_InsertTire(x,AIDS_SERVER_NAME,AIDS_SERVER); \
aids_InsertTire(x,AIDS_VARY_NAME,AIDS_VARY); \
aids_InsertTire(x,AIDS_WARNING_NAME,AIDS_WARNING); \
aids_InsertTire(x,AIDS_WWW_AUTHENTICATE_NAME,AIDS_WWW_AUTHENTICATE); \
aids_InsertTire(x,AIDS_ALLOW_NAME,AIDS_ALLOW); \
aids_InsertTire(x,AIDS_CONTENT_BASE_NAME,AIDS_CONTENT_BASE); \
aids_InsertTire(x,AIDS_CONTENT_LOCATION_NAME,AIDS_CONTENT_LOCATION); \
aids_InsertTire(x,AIDS_CONTENT_MD5_NAME,AIDS_CONTENT_MD5); \
aids_InsertTire(x,AIDS_CONTENT_RANGE_NAME,AIDS_CONTENT_RANGE); \
aids_InsertTire(x,AIDS_ETAG_NAME,AIDS_ETAG); \
aids_InsertTire(x,AIDS_EXPIRES_NAME,AIDS_EXPIRES); \
aids_InsertTire(x,AIDS_LAST_MODIFIED_NAME,AIDS_LAST_MODIFIED); \
aids_InsertTire(x,AIDS_VERSION_NAME,AIDS_VERSION); \
aids_InsertTire(x,AIDS_STATUS_NAME,AIDS_STATUS); \
aids_InsertTire(x,AIDS_X_REQUESTED_WITH_NAME,AIDS_X_REQUESTED_WITH); \
aids_InsertTire(x,AIDS_SET_COOKIE_NAME,AIDS_SET_COOKIE); \
}
#define AIDS_HTTPHEADER_SEQ_MAXLEN 16
extern TrieSTPtr g_aids_httpheader_tire;
int aids_httpheader_id_init(void);
void aids_httpheader_id_deinit(void);
int aids_httpheader_lookup(char *headername, unsigned int headerlen);
int aids_httpheader_lookup_seq(char *headername, unsigned int headerlen);
#endif