src/server/util/pblock.h

branch
cpp-ports
changeset 363
7f0f5c03666a
parent 162
b169992137a8
child 386
b91f8efadb63
equal deleted inserted replaced
362:e45f218628cd 363:7f0f5c03666a
107 107
108 /* --------------------------- Internal things ---------------------------- */ 108 /* --------------------------- Internal things ---------------------------- */
109 109
110 typedef struct pb_key pb_key; 110 typedef struct pb_key pb_key;
111 111
112 extern const pb_key *const pb_key_accept; 112 extern const pb_key *pb_key_accept;
113 extern const pb_key *const pb_key_accept_charset; 113 extern const pb_key *pb_key_accept_charset;
114 extern const pb_key *const pb_key_accept_encoding; 114 extern const pb_key *pb_key_accept_encoding;
115 extern const pb_key *const pb_key_accept_language; 115 extern const pb_key *pb_key_accept_language;
116 extern const pb_key *const pb_key_accept_ranges; 116 extern const pb_key *pb_key_accept_ranges;
117 extern const pb_key *const pb_key_actual_route; 117 extern const pb_key *pb_key_actual_route;
118 extern const pb_key *const pb_key_age; 118 extern const pb_key *pb_key_age;
119 extern const pb_key *const pb_key_always_allow_chunked; 119 extern const pb_key *pb_key_always_allow_chunked;
120 extern const pb_key *const pb_key_always_use_keep_alive; 120 extern const pb_key *pb_key_always_use_keep_alive;
121 extern const pb_key *const pb_key_auth_cert; 121 extern const pb_key *pb_key_auth_cert;
122 extern const pb_key *const pb_key_auth_expiring; 122 extern const pb_key *pb_key_auth_expiring;
123 extern const pb_key *const pb_key_auth_group; 123 extern const pb_key *pb_key_auth_group;
124 extern const pb_key *const pb_key_auth_type; 124 extern const pb_key *pb_key_auth_type;
125 extern const pb_key *const pb_key_auth_user; 125 extern const pb_key *pb_key_auth_user;
126 extern const pb_key *const pb_key_authorization; 126 extern const pb_key *pb_key_authorization;
127 extern const pb_key *const pb_key_browser; 127 extern const pb_key *pb_key_browser;
128 extern const pb_key *const pb_key_c2p_cl; 128 extern const pb_key *pb_key_c2p_cl;
129 extern const pb_key *const pb_key_c2p_hl; 129 extern const pb_key *pb_key_c2p_hl;
130 extern const pb_key *const pb_key_cache_info; 130 extern const pb_key *pb_key_cache_info;
131 extern const pb_key *const pb_key_charset; 131 extern const pb_key *pb_key_charset;
132 extern const pb_key *const pb_key_check_http_server; 132 extern const pb_key *pb_key_check_http_server;
133 extern const pb_key *const pb_key_ChunkedRequestBufferSize; 133 extern const pb_key *pb_key_ChunkedRequestBufferSize;
134 extern const pb_key *const pb_key_ChunkedRequestTimeout; 134 extern const pb_key *pb_key_ChunkedRequestTimeout;
135 extern const pb_key *const pb_key_cipher; 135 extern const pb_key *pb_key_cipher;
136 extern const pb_key *const pb_key_clf_request; 136 extern const pb_key *pb_key_clf_request;
137 extern const pb_key *const pb_key_cli_status; 137 extern const pb_key *pb_key_cli_status;
138 extern const pb_key *const pb_key_client_cert_nickname; 138 extern const pb_key *pb_key_client_cert_nickname;
139 extern const pb_key *const pb_key_client_ip; 139 extern const pb_key *pb_key_client_ip;
140 extern const pb_key *const pb_key_close; 140 extern const pb_key *pb_key_close;
141 extern const pb_key *const pb_key_connect_timeout; 141 extern const pb_key *pb_key_connect_timeout;
142 extern const pb_key *const pb_key_connection; 142 extern const pb_key *pb_key_connection;
143 extern const pb_key *const pb_key_cont; 143 extern const pb_key *pb_key_cont;
144 extern const pb_key *const pb_key_content_encoding; 144 extern const pb_key *pb_key_content_encoding;
145 extern const pb_key *const pb_key_content_language; 145 extern const pb_key *pb_key_content_language;
146 extern const pb_key *const pb_key_content_length; 146 extern const pb_key *pb_key_content_length;
147 extern const pb_key *const pb_key_content_location; 147 extern const pb_key *pb_key_content_location;
148 extern const pb_key *const pb_key_content_md5; 148 extern const pb_key *pb_key_content_md5;
149 extern const pb_key *const pb_key_content_range; 149 extern const pb_key *pb_key_content_range;
150 extern const pb_key *const pb_key_content_type; 150 extern const pb_key *pb_key_content_type;
151 extern const pb_key *const pb_key_cookie; 151 extern const pb_key *pb_key_cookie;
152 extern const pb_key *const pb_key_date; 152 extern const pb_key *pb_key_date;
153 extern const pb_key *const pb_key_DATE_GMT; 153 extern const pb_key *pb_key_DATE_GMT;
154 extern const pb_key *const pb_key_DATE_LOCAL; 154 extern const pb_key *pb_key_DATE_LOCAL;
155 extern const pb_key *const pb_key_dir; 155 extern const pb_key *pb_key_dir;
156 extern const pb_key *const pb_key_Directive; 156 extern const pb_key *pb_key_Directive;
157 extern const pb_key *const pb_key_dns; 157 extern const pb_key *pb_key_dns;
158 extern const pb_key *const pb_key_DOCUMENT_NAME; 158 extern const pb_key *pb_key_DOCUMENT_NAME;
159 extern const pb_key *const pb_key_DOCUMENT_URI; 159 extern const pb_key *pb_key_DOCUMENT_URI;
160 extern const pb_key *const pb_key_domain; 160 extern const pb_key *pb_key_domain;
161 extern const pb_key *const pb_key_enc; 161 extern const pb_key *pb_key_enc;
162 extern const pb_key *const pb_key_engine; 162 extern const pb_key *pb_key_engine;
163 extern const pb_key *const pb_key_error_action; 163 extern const pb_key *pb_key_error_action;
164 extern const pb_key *const pb_key_error_desc; 164 extern const pb_key *pb_key_error_desc;
165 extern const pb_key *const pb_key_error_fn; 165 extern const pb_key *pb_key_error_fn;
166 extern const pb_key *const pb_key_escape; 166 extern const pb_key *pb_key_escape;
167 extern const pb_key *const pb_key_escaped; 167 extern const pb_key *pb_key_escaped;
168 extern const pb_key *const pb_key_etag; 168 extern const pb_key *pb_key_etag;
169 extern const pb_key *const pb_key_expect; 169 extern const pb_key *pb_key_expect;
170 extern const pb_key *const pb_key_expires; 170 extern const pb_key *pb_key_expires;
171 extern const pb_key *const pb_key_expr; 171 extern const pb_key *pb_key_expr;
172 extern const pb_key *const pb_key_filter; 172 extern const pb_key *pb_key_filter;
173 extern const pb_key *const pb_key_find_pathinfo_forward; 173 extern const pb_key *pb_key_find_pathinfo_forward;
174 extern const pb_key *const pb_key_flushTimer; 174 extern const pb_key *pb_key_flushTimer;
175 extern const pb_key *const pb_key_fn; 175 extern const pb_key *pb_key_fn;
176 extern const pb_key *const pb_key_from; 176 extern const pb_key *pb_key_from;
177 extern const pb_key *const pb_key_full_headers; 177 extern const pb_key *pb_key_full_headers;
178 extern const pb_key *const pb_key_hdr; 178 extern const pb_key *pb_key_hdr;
179 extern const pb_key *const pb_key_host; 179 extern const pb_key *pb_key_host;
180 extern const pb_key *const pb_key_hostname; 180 extern const pb_key *pb_key_hostname;
181 extern const pb_key *const pb_key_if_match; 181 extern const pb_key *pb_key_if_match;
182 extern const pb_key *const pb_key_if_modified_since; 182 extern const pb_key *pb_key_if_modified_since;
183 extern const pb_key *const pb_key_if_none_match; 183 extern const pb_key *pb_key_if_none_match;
184 extern const pb_key *const pb_key_if_range; 184 extern const pb_key *pb_key_if_range;
185 extern const pb_key *const pb_key_if_unmodified_since; 185 extern const pb_key *pb_key_if_unmodified_since;
186 extern const pb_key *const pb_key_ip; 186 extern const pb_key *pb_key_ip;
187 extern const pb_key *const pb_key_iponly; 187 extern const pb_key *pb_key_iponly;
188 extern const pb_key *const pb_key_issuer_dn; 188 extern const pb_key *pb_key_issuer_dn;
189 extern const pb_key *const pb_key_jroute; 189 extern const pb_key *pb_key_jroute;
190 extern const pb_key *const pb_key_keep_alive; 190 extern const pb_key *pb_key_keep_alive;
191 extern const pb_key *const pb_key_keep_alive_timeout; 191 extern const pb_key *pb_key_keep_alive_timeout;
192 extern const pb_key *const pb_key_keysize; 192 extern const pb_key *pb_key_keysize;
193 extern const pb_key *const pb_key_lang; 193 extern const pb_key *pb_key_lang;
194 extern const pb_key *const pb_key_last_modified; 194 extern const pb_key *pb_key_last_modified;
195 extern const pb_key *const pb_key_level; 195 extern const pb_key *pb_key_level;
196 extern const pb_key *const pb_key_location; 196 extern const pb_key *pb_key_location;
197 extern const pb_key *const pb_key_lock_owner; 197 extern const pb_key *pb_key_lock_owner;
198 extern const pb_key *const pb_key_magnus_charset; 198 extern const pb_key *pb_key_magnus_charset;
199 extern const pb_key *const pb_key_magnus_internal; 199 extern const pb_key *pb_key_magnus_internal;
200 extern const pb_key *const pb_key_magnus_internal_dav_src; 200 extern const pb_key *pb_key_magnus_internal_dav_src;
201 extern const pb_key *const pb_key_magnus_internal_default_acls_only; 201 extern const pb_key *pb_key_magnus_internal_default_acls_only;
202 extern const pb_key *const pb_key_magnus_internal_error_j2ee; 202 extern const pb_key *pb_key_magnus_internal_error_j2ee;
203 extern const pb_key *const pb_key_magnus_internal_j2ee_nsapi; 203 extern const pb_key *pb_key_magnus_internal_j2ee_nsapi;
204 extern const pb_key *const pb_key_magnus_internal_preserve_srvhdrs; 204 extern const pb_key *pb_key_magnus_internal_preserve_srvhdrs;
205 extern const pb_key *const pb_key_magnus_internal_set_request_status; 205 extern const pb_key *pb_key_magnus_internal_set_request_status;
206 extern const pb_key *const pb_key_magnus_internal_set_response_status; 206 extern const pb_key *pb_key_magnus_internal_set_response_status;
207 extern const pb_key *const pb_key_magnus_internal_webapp_errordesc; 207 extern const pb_key *pb_key_magnus_internal_webapp_errordesc;
208 extern const pb_key *const pb_key_matched_browser; 208 extern const pb_key *pb_key_matched_browser;
209 extern const pb_key *const pb_key_max_age; 209 extern const pb_key *pb_key_max_age;
210 extern const pb_key *const pb_key_max_forwards; 210 extern const pb_key *pb_key_max_forwards;
211 extern const pb_key *const pb_key_message; 211 extern const pb_key *pb_key_message;
212 extern const pb_key *const pb_key_method; 212 extern const pb_key *pb_key_method;
213 extern const pb_key *const pb_key_name; 213 extern const pb_key *pb_key_name;
214 extern const pb_key *const pb_key_nocache; 214 extern const pb_key *pb_key_nocache;
215 extern const pb_key *const pb_key_nostat; 215 extern const pb_key *pb_key_nostat;
216 extern const pb_key *const pb_key_ntrans_base; 216 extern const pb_key *pb_key_ntrans_base;
217 extern const pb_key *const pb_key_offline_origin_addr; 217 extern const pb_key *pb_key_offline_origin_addr;
218 extern const pb_key *const pb_key_offline_proxy_addr; 218 extern const pb_key *pb_key_offline_proxy_addr;
219 extern const pb_key *const pb_key_origin_addr; 219 extern const pb_key *pb_key_origin_addr;
220 extern const pb_key *const pb_key_p2c_cl; 220 extern const pb_key *pb_key_p2c_cl;
221 extern const pb_key *const pb_key_p2c_hl; 221 extern const pb_key *pb_key_p2c_hl;
222 extern const pb_key *const pb_key_p2r_cl; 222 extern const pb_key *pb_key_p2r_cl;
223 extern const pb_key *const pb_key_p2r_hl; 223 extern const pb_key *pb_key_p2r_hl;
224 extern const pb_key *const pb_key_parse_timeout; 224 extern const pb_key *pb_key_parse_timeout;
225 extern const pb_key *const pb_key_password; 225 extern const pb_key *pb_key_password;
226 extern const pb_key *const pb_key_path; 226 extern const pb_key *pb_key_path;
227 extern const pb_key *const pb_key_PATH_INFO; 227 extern const pb_key *pb_key_PATH_INFO;
228 extern const pb_key *const pb_key_path_info; 228 extern const pb_key *pb_key_path_info;
229 extern const pb_key *const pb_key_pblock; 229 extern const pb_key *pb_key_pblock;
230 extern const pb_key *const pb_key_poll_interval; 230 extern const pb_key *pb_key_poll_interval;
231 extern const pb_key *const pb_key_pool; // new 231 extern const pb_key *pb_key_pool; // new
232 extern const pb_key *const pb_key_port; 232 extern const pb_key *pb_key_port;
233 extern const pb_key *const pb_key_ppath; 233 extern const pb_key *pb_key_ppath;
234 extern const pb_key *const pb_key_pragma; 234 extern const pb_key *pb_key_pragma;
235 extern const pb_key *const pb_key_process_request_body; 235 extern const pb_key *pb_key_process_request_body;
236 extern const pb_key *const pb_key_process_response_body; 236 extern const pb_key *pb_key_process_response_body;
237 extern const pb_key *const pb_key_protocol; 237 extern const pb_key *pb_key_protocol;
238 extern const pb_key *const pb_key_proxy_addr; 238 extern const pb_key *pb_key_proxy_addr;
239 extern const pb_key *const pb_key_proxy_agent; 239 extern const pb_key *pb_key_proxy_agent;
240 extern const pb_key *const pb_key_proxy_auth_cert; 240 extern const pb_key *pb_key_proxy_auth_cert;
241 extern const pb_key *const pb_key_proxy_authorization; 241 extern const pb_key *pb_key_proxy_authorization;
242 extern const pb_key *const pb_key_proxy_cipher; 242 extern const pb_key *pb_key_proxy_cipher;
243 extern const pb_key *const pb_key_proxy_issuer_dn; 243 extern const pb_key *pb_key_proxy_issuer_dn;
244 extern const pb_key *const pb_key_proxy_jroute; 244 extern const pb_key *pb_key_proxy_jroute;
245 extern const pb_key *const pb_key_proxy_keysize; 245 extern const pb_key *pb_key_proxy_keysize;
246 extern const pb_key *const pb_key_proxy_ping; 246 extern const pb_key *pb_key_proxy_ping;
247 extern const pb_key *const pb_key_proxy_request; 247 extern const pb_key *pb_key_proxy_request;
248 extern const pb_key *const pb_key_proxy_secret_keysize; 248 extern const pb_key *pb_key_proxy_secret_keysize;
249 extern const pb_key *const pb_key_proxy_ssl_id; 249 extern const pb_key *pb_key_proxy_ssl_id;
250 extern const pb_key *const pb_key_proxy_user_dn; 250 extern const pb_key *pb_key_proxy_user_dn;
251 extern const pb_key *const pb_key_query; 251 extern const pb_key *pb_key_query;
252 extern const pb_key *const pb_key_QUERY_STRING; 252 extern const pb_key *pb_key_QUERY_STRING;
253 extern const pb_key *const pb_key_QUERY_STRING_UNESCAPED; 253 extern const pb_key *pb_key_QUERY_STRING_UNESCAPED;
254 extern const pb_key *const pb_key_r2p_cl; 254 extern const pb_key *pb_key_r2p_cl;
255 extern const pb_key *const pb_key_r2p_hl; 255 extern const pb_key *pb_key_r2p_hl;
256 extern const pb_key *const pb_key_range; 256 extern const pb_key *pb_key_range;
257 extern const pb_key *const pb_key_referer; 257 extern const pb_key *pb_key_referer;
258 extern const pb_key *const pb_key_reformat_request_headers; 258 extern const pb_key *pb_key_reformat_request_headers;
259 extern const pb_key *const pb_key_remote_status; 259 extern const pb_key *pb_key_remote_status;
260 extern const pb_key *const pb_key_request_jroute; 260 extern const pb_key *pb_key_request_jroute;
261 extern const pb_key *const pb_key_required_rights; 261 extern const pb_key *pb_key_required_rights;
262 extern const pb_key *const pb_key_retries; 262 extern const pb_key *pb_key_retries;
263 extern const pb_key *const pb_key_rewrite_content_location; 263 extern const pb_key *pb_key_rewrite_content_location;
264 extern const pb_key *const pb_key_rewrite_host; 264 extern const pb_key *pb_key_rewrite_host;
265 extern const pb_key *const pb_key_rewrite_location; 265 extern const pb_key *pb_key_rewrite_location;
266 extern const pb_key *const pb_key_rewrite_set_cookie; 266 extern const pb_key *pb_key_rewrite_set_cookie;
267 extern const pb_key *const pb_key_root; 267 extern const pb_key *pb_key_root;
268 extern const pb_key *const pb_key_route; 268 extern const pb_key *pb_key_route;
269 extern const pb_key *const pb_key_route_cookie; 269 extern const pb_key *pb_key_route_cookie;
270 extern const pb_key *const pb_key_route_hdr; 270 extern const pb_key *pb_key_route_hdr;
271 extern const pb_key *const pb_key_route_offline; 271 extern const pb_key *pb_key_route_offline;
272 extern const pb_key *const pb_key_script_name; 272 extern const pb_key *pb_key_script_name;
273 extern const pb_key *const pb_key_secret_keysize; 273 extern const pb_key *pb_key_secret_keysize;
274 extern const pb_key *const pb_key_secure; 274 extern const pb_key *pb_key_secure;
275 extern const pb_key *const pb_key_server; 275 extern const pb_key *pb_key_server;
276 extern const pb_key *const pb_key_set_cookie; 276 extern const pb_key *pb_key_set_cookie;
277 extern const pb_key *const pb_key_socks_addr; 277 extern const pb_key *pb_key_socks_addr;
278 extern const pb_key *const pb_key_ssl_id; 278 extern const pb_key *pb_key_ssl_id;
279 extern const pb_key *const pb_key_ssl_unclean_shutdown; 279 extern const pb_key *pb_key_ssl_unclean_shutdown;
280 extern const pb_key *const pb_key_status; 280 extern const pb_key *pb_key_status;
281 extern const pb_key *const pb_key_sticky_cookie; 281 extern const pb_key *pb_key_sticky_cookie;
282 extern const pb_key *const pb_key_sticky_param; 282 extern const pb_key *pb_key_sticky_param;
283 extern const pb_key *const pb_key_suppress_request_headers; 283 extern const pb_key *pb_key_suppress_request_headers;
284 extern const pb_key *const pb_key_svr_status; 284 extern const pb_key *pb_key_svr_status;
285 extern const pb_key *const pb_key_timeout; 285 extern const pb_key *pb_key_timeout;
286 extern const pb_key *const pb_key_to; 286 extern const pb_key *pb_key_to;
287 extern const pb_key *const pb_key_transfer_encoding; 287 extern const pb_key *pb_key_transfer_encoding;
288 extern const pb_key *const pb_key_transmit_timeout; 288 extern const pb_key *pb_key_transmit_timeout;
289 extern const pb_key *const pb_key_tunnel_non_http_response; 289 extern const pb_key *pb_key_tunnel_non_http_response;
290 extern const pb_key *const pb_key_type; 290 extern const pb_key *pb_key_type;
291 extern const pb_key *const pb_key_upstream_jroute; 291 extern const pb_key *pb_key_upstream_jroute;
292 extern const pb_key *const pb_key_uri; 292 extern const pb_key *pb_key_uri;
293 extern const pb_key *const pb_key_url; 293 extern const pb_key *pb_key_url;
294 extern const pb_key *const pb_key_url_prefix; 294 extern const pb_key *pb_key_url_prefix;
295 extern const pb_key *const pb_key_UseOutputStreamSize; 295 extern const pb_key *pb_key_UseOutputStreamSize;
296 extern const pb_key *const pb_key_user; 296 extern const pb_key *pb_key_user;
297 extern const pb_key *const pb_key_user_agent; 297 extern const pb_key *pb_key_user_agent;
298 extern const pb_key *const pb_key_user_dn; 298 extern const pb_key *pb_key_user_dn;
299 extern const pb_key *const pb_key_validate_server_cert; 299 extern const pb_key *pb_key_validate_server_cert;
300 extern const pb_key *const pb_key_value; 300 extern const pb_key *pb_key_value;
301 extern const pb_key *const pb_key_vary; 301 extern const pb_key *pb_key_vary;
302 extern const pb_key *const pb_key_via; 302 extern const pb_key *pb_key_via;
303 extern const pb_key *const pb_key_warning; 303 extern const pb_key *pb_key_warning;
304
305 NSAPI_PUBLIC void pblock_init_default_keys(void);
306
307 NSAPI_PUBLIC void pblock_free_default_keys(void);
304 308
305 NSAPI_PUBLIC pool_handle_t *pblock_pool(pblock *pb); 309 NSAPI_PUBLIC pool_handle_t *pblock_pool(pblock *pb);
306 310
307 NSAPI_PUBLIC pb_param *pblock_param_create(pblock *pb, const char *name, const char *value); 311 NSAPI_PUBLIC pb_param *pblock_param_create(pblock *pb, const char *name, const char *value);
308 312
334 338
335 NSAPI_PUBLIC pb_param *pblock_kninsert(const pb_key *key, int value, pblock *pb); 339 NSAPI_PUBLIC pb_param *pblock_kninsert(const pb_key *key, int value, pblock *pb);
336 340
337 NSAPI_PUBLIC pb_param *pblock_kllinsert(const pb_key *key, int64_t value, pblock *pb); 341 NSAPI_PUBLIC pb_param *pblock_kllinsert(const pb_key *key, int64_t value, pblock *pb);
338 342
339 #ifdef __cplusplus 343 #define PARAM_KEY(pp) *(const pb_key **)((pp) + 1) /* new */
340 inline const pb_key *param_key(pb_param *pp)
341 {
342 return *(const pb_key **)(pp + 1); /* XXX see plist_pvt.h */
343 }
344 #endif
345
346 #define PARAM_KEY(pp) *(const pb_key **)(pp + 1) /* new */
347 344
348 #ifdef __cplusplus 345 #ifdef __cplusplus
349 } 346 }
350 #endif 347 #endif
351 348

mercurial