A brief file description. More...
#include <assert.h>
#include <sys/types.h>
#include "ink_assert.h"
#include "ink_atomic.h"
#include "ink_defs.h"
#include "ink_string.h"
#include "Allocator.h"
#include "Regex.h"
#include "ink_apidefs.h"
Go to the source code of this file.
Data Structures | |
struct | HdrTokenTypeBinding |
struct | HdrTokenFieldInfo |
struct | HdrTokenTypeSpecific |
struct | HdrTokenHeapPrefix |
Defines | |
#define | SIZEOF(x) (sizeof (x) / sizeof (x[0])) |
#define | MIME_FLAGS_NONE HTIF_NONE |
#define | MIME_FLAGS_COMMAS HTIF_COMMAS |
#define | MIME_FLAGS_MULTVALS HTIF_MULTVALS |
#define | MIME_FLAGS_HOPBYHOP HTIF_HOPBYHOP |
#define | MIME_FLAGS_PROXYAUTH HTIF_PROXYAUTH |
#define | MIME_SLOTID_ACCEPT 0 |
#define | MIME_SLOTID_ACCEPT_CHARSET 1 |
#define | MIME_SLOTID_ACCEPT_ENCODING 2 |
#define | MIME_SLOTID_ACCEPT_LANGUAGE 3 |
#define | MIME_SLOTID_AGE 4 |
#define | MIME_SLOTID_AUTHORIZATION 5 |
#define | MIME_SLOTID_CACHE_CONTROL 6 |
#define | MIME_SLOTID_CLIENT_IP 7 |
#define | MIME_SLOTID_CONNECTION 8 |
#define | MIME_SLOTID_CONTENT_ENCODING 9 |
#define | MIME_SLOTID_CONTENT_LANGUAGE 10 |
#define | MIME_SLOTID_CONTENT_LENGTH 11 |
#define | MIME_SLOTID_CONTENT_TYPE 12 |
#define | MIME_SLOTID_COOKIE 13 |
#define | MIME_SLOTID_DATE 14 |
#define | MIME_SLOTID_EXPIRES 15 |
#define | MIME_SLOTID_IF_MATCH 16 |
#define | MIME_SLOTID_IF_MODIFIED_SINCE 17 |
#define | MIME_SLOTID_IF_NONE_MATCH 18 |
#define | MIME_SLOTID_IF_RANGE 19 |
#define | MIME_SLOTID_IF_UNMODIFIED_SINCE 20 |
#define | MIME_SLOTID_LAST_MODIFIED 21 |
#define | MIME_SLOTID_PRAGMA 22 |
#define | MIME_SLOTID_PROXY_CONNECTION 23 |
#define | MIME_SLOTID_RANGE 24 |
#define | MIME_SLOTID_SET_COOKIE 25 |
#define | MIME_SLOTID_TE 26 |
#define | MIME_SLOTID_TRANSFER_ENCODING 27 |
#define | MIME_SLOTID_USER_AGENT 28 |
#define | MIME_SLOTID_VARY 29 |
#define | MIME_SLOTID_VIA 30 |
#define | MIME_SLOTID_WWW_AUTHENTICATE 31 |
#define | MIME_SLOTID_NONE -1 |
#define | TOK_64_CONST(x) x ## LL |
#define | MIME_PRESENCE_ACCEPT (TOK_64_CONST(1) << 0) |
#define | MIME_PRESENCE_ACCEPT_CHARSET (TOK_64_CONST(1) << 1) |
#define | MIME_PRESENCE_ACCEPT_ENCODING (TOK_64_CONST(1) << 2) |
#define | MIME_PRESENCE_ACCEPT_LANGUAGE (TOK_64_CONST(1) << 3) |
#define | MIME_PRESENCE_ACCEPT_RANGES (TOK_64_CONST(1) << 4) |
#define | MIME_PRESENCE_AGE (TOK_64_CONST(1) << 5) |
#define | MIME_PRESENCE_ALLOW (TOK_64_CONST(1) << 6) |
#define | MIME_PRESENCE_AUTHORIZATION (TOK_64_CONST(1) << 7) |
#define | MIME_PRESENCE_BYTES (TOK_64_CONST(1) << 8) |
#define | MIME_PRESENCE_CACHE_CONTROL (TOK_64_CONST(1) << 9) |
#define | MIME_PRESENCE_CLIENT_IP (TOK_64_CONST(1) << 10) |
#define | MIME_PRESENCE_CONNECTION (TOK_64_CONST(1) << 11) |
#define | MIME_PRESENCE_CONTENT_ENCODING (TOK_64_CONST(1) << 12) |
#define | MIME_PRESENCE_CONTENT_LANGUAGE (TOK_64_CONST(1) << 13) |
#define | MIME_PRESENCE_CONTENT_LENGTH (TOK_64_CONST(1) << 14) |
#define | MIME_PRESENCE_CONTENT_LOCATION (TOK_64_CONST(1) << 15) |
#define | MIME_PRESENCE_CONTENT_MD5 (TOK_64_CONST(1) << 16) |
#define | MIME_PRESENCE_CONTENT_RANGE (TOK_64_CONST(1) << 17) |
#define | MIME_PRESENCE_CONTENT_TYPE (TOK_64_CONST(1) << 18) |
#define | MIME_PRESENCE_COOKIE (TOK_64_CONST(1) << 19) |
#define | MIME_PRESENCE_DATE (TOK_64_CONST(1) << 20) |
#define | MIME_PRESENCE_ETAG (TOK_64_CONST(1) << 21) |
#define | MIME_PRESENCE_EXPIRES (TOK_64_CONST(1) << 22) |
#define | MIME_PRESENCE_FROM (TOK_64_CONST(1) << 23) |
#define | MIME_PRESENCE_HOST (TOK_64_CONST(1) << 24) |
#define | MIME_PRESENCE_IF_MATCH (TOK_64_CONST(1) << 25) |
#define | MIME_PRESENCE_IF_MODIFIED_SINCE (TOK_64_CONST(1) << 26) |
#define | MIME_PRESENCE_IF_NONE_MATCH (TOK_64_CONST(1) << 27) |
#define | MIME_PRESENCE_IF_RANGE (TOK_64_CONST(1) << 28) |
#define | MIME_PRESENCE_IF_UNMODIFIED_SINCE (TOK_64_CONST(1) << 29) |
#define | MIME_PRESENCE_KEEP_ALIVE (TOK_64_CONST(1) << 30) |
#define | MIME_PRESENCE_KEYWORDS (TOK_64_CONST(1) << 31) |
#define | MIME_PRESENCE_LAST_MODIFIED (TOK_64_CONST(1) << 32) |
#define | MIME_PRESENCE_LINES (TOK_64_CONST(1) << 33) |
#define | MIME_PRESENCE_LOCATION (TOK_64_CONST(1) << 34) |
#define | MIME_PRESENCE_MAX_FORWARDS (TOK_64_CONST(1) << 35) |
#define | MIME_PRESENCE_PATH (TOK_64_CONST(1) << 36) |
#define | MIME_PRESENCE_PRAGMA (TOK_64_CONST(1) << 37) |
#define | MIME_PRESENCE_PROXY_AUTHENTICATE (TOK_64_CONST(1) << 38) |
#define | MIME_PRESENCE_PROXY_AUTHORIZATION (TOK_64_CONST(1) << 39) |
#define | MIME_PRESENCE_PROXY_CONNECTION (TOK_64_CONST(1) << 40) |
#define | MIME_PRESENCE_PUBLIC (TOK_64_CONST(1) << 41) |
#define | MIME_PRESENCE_RANGE (TOK_64_CONST(1) << 42) |
#define | MIME_PRESENCE_REFERER (TOK_64_CONST(1) << 43) |
#define | MIME_PRESENCE_SERVER (TOK_64_CONST(1) << 44) |
#define | MIME_PRESENCE_SET_COOKIE (TOK_64_CONST(1) << 45) |
#define | MIME_PRESENCE_SUBJECT (TOK_64_CONST(1) << 46) |
#define | MIME_PRESENCE_SUMMARY (TOK_64_CONST(1) << 47) |
#define | MIME_PRESENCE_TE (TOK_64_CONST(1) << 48) |
#define | MIME_PRESENCE_TRANSFER_ENCODING (TOK_64_CONST(1) << 49) |
#define | MIME_PRESENCE_UPGRADE (TOK_64_CONST(1) << 50) |
#define | MIME_PRESENCE_USER_AGENT (TOK_64_CONST(1) << 51) |
#define | MIME_PRESENCE_VARY (TOK_64_CONST(1) << 52) |
#define | MIME_PRESENCE_VIA (TOK_64_CONST(1) << 53) |
#define | MIME_PRESENCE_WARNING (TOK_64_CONST(1) << 54) |
#define | MIME_PRESENCE_WWW_AUTHENTICATE (TOK_64_CONST(1) << 55) |
#define | MIME_PRESENCE_UNUSED_1 (TOK_64_CONST(1) << 56) |
#define | MIME_PRESENCE_UNUSED_2 (TOK_64_CONST(1) << 57) |
#define | MIME_PRESENCE_UNUSED_3 (TOK_64_CONST(1) << 58) |
#define | MIME_PRESENCE_UNUSED_4 (TOK_64_CONST(1) << 59) |
#define | MIME_PRESENCE_UNUSED_5 (TOK_64_CONST(1) << 60) |
#define | MIME_PRESENCE_XREF (TOK_64_CONST(1) << 61) |
#define | MIME_PRESENCE_INT_DATA_INFO (TOK_64_CONST(1) << 62) |
#define | MIME_PRESENCE_NONE TOK_64_CONST(0) |
#define | MIME_PRESENCE_ALL ~(TOK_64_CONST(0)) |
Enumerations | |
enum | HdrTokenType { HDRTOKEN_TYPE_OTHER = 0, HDRTOKEN_TYPE_FIELD = 1, HDRTOKEN_TYPE_METHOD = 2, HDRTOKEN_TYPE_SCHEME = 3, HDRTOKEN_TYPE_CACHE_CONTROL = 4 } |
enum | HdrTokenInfoFlags { HTIF_NONE = 0, HTIF_COMMAS = 1 << 0, HTIF_MULTVALS = 1 << 1, HTIF_HOPBYHOP = 1 << 2, HTIF_PROXYAUTH = 1 << 3 } |
Functions | |
void | hdrtoken_init () |
int | hdrtoken_tokenize_dfa (const char *string, int string_len, const char **wks_string_out=NULL) |
inkcoreapi int | hdrtoken_tokenize (const char *string, int string_len, const char **wks_string_out=NULL) |
const char * | hdrtoken_string_to_wks (const char *string) |
const char * | hdrtoken_string_to_wks (const char *string, int length) |
bool | hdrtoken_is_wks (const char *str) |
bool | hdrtoken_is_valid_wks_idx (int wks_idx) |
HdrTokenHeapPrefix * | hdrtoken_wks_to_prefix (const char *wks) |
const char * | hdrtoken_index_to_wks (int wks_idx) |
int | hdrtoken_index_to_length (int wks_idx) |
HdrTokenType | hdrtoken_index_to_token_type (int wks_idx) |
int | hdrtoken_index_to_slotid (int wks_idx) |
uint64_t | hdrtoken_index_to_mask (int wks_idx) |
int | hdrtoken_index_to_flags (int wks_idx) |
HdrTokenHeapPrefix * | hdrtoken_index_to_prefix (int wks_idx) |
int | hdrtoken_wks_to_index (const char *wks) |
int | hdrtoken_wks_to_length (const char *wks) |
int | hdrtoken_wks_to_token_type (const char *wks) |
int | hdrtoken_wks_to_slotid (const char *wks) |
uint64_t | hdrtoken_wks_to_mask (const char *wks) |
int | hdrtoken_wks_to_flags (const char *wks) |
Variables | |
DFA * | hdrtoken_strs_dfa |
int | hdrtoken_num_wks |
const char * | hdrtoken_strs [] |
int | hdrtoken_str_lengths [] |
HdrTokenType | hdrtoken_str_token_types [] |
int32_t | hdrtoken_str_slotids [] |
uint64_t | hdrtoken_str_masks [] |
uint32_t | hdrtoken_str_flags [] |
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file HdrToken.h.
#define MIME_FLAGS_COMMAS HTIF_COMMAS |
Definition at line 98 of file HdrToken.h.
Referenced by MIMEField::supports_commas().
#define MIME_FLAGS_HOPBYHOP HTIF_HOPBYHOP |
Definition at line 100 of file HdrToken.h.
Referenced by HttpTransactHeaders::copy_header_fields(), and HttpTransactHeaders::is_this_a_hop_by_hop_header().
#define MIME_FLAGS_MULTVALS HTIF_MULTVALS |
Definition at line 99 of file HdrToken.h.
#define MIME_FLAGS_NONE HTIF_NONE |
Definition at line 97 of file HdrToken.h.
#define MIME_FLAGS_PROXYAUTH HTIF_PROXYAUTH |
Definition at line 101 of file HdrToken.h.
Referenced by HttpTransactHeaders::copy_header_fields().
#define MIME_PRESENCE_ACCEPT (TOK_64_CONST(1) << 0) |
Definition at line 317 of file HdrToken.h.
#define MIME_PRESENCE_ACCEPT_CHARSET (TOK_64_CONST(1) << 1) |
Definition at line 318 of file HdrToken.h.
#define MIME_PRESENCE_ACCEPT_ENCODING (TOK_64_CONST(1) << 2) |
Definition at line 319 of file HdrToken.h.
#define MIME_PRESENCE_ACCEPT_LANGUAGE (TOK_64_CONST(1) << 3) |
Definition at line 320 of file HdrToken.h.
#define MIME_PRESENCE_ACCEPT_RANGES (TOK_64_CONST(1) << 4) |
Definition at line 321 of file HdrToken.h.
#define MIME_PRESENCE_AGE (TOK_64_CONST(1) << 5) |
Definition at line 322 of file HdrToken.h.
Referenced by HttpTransact::merge_and_update_headers_for_cache_update().
#define MIME_PRESENCE_ALL ~(TOK_64_CONST(0)) |
Definition at line 386 of file HdrToken.h.
#define MIME_PRESENCE_ALLOW (TOK_64_CONST(1) << 6) |
Definition at line 323 of file HdrToken.h.
#define MIME_PRESENCE_AUTHORIZATION (TOK_64_CONST(1) << 7) |
Definition at line 324 of file HdrToken.h.
Referenced by HttpTransact::AuthenticationNeeded(), HttpTransact::is_request_likely_cacheable(), and HttpSM::setup_server_send_request().
#define MIME_PRESENCE_BYTES (TOK_64_CONST(1) << 8) |
Definition at line 325 of file HdrToken.h.
#define MIME_PRESENCE_CACHE_CONTROL (TOK_64_CONST(1) << 9) |
Definition at line 326 of file HdrToken.h.
Referenced by HttpTransactHeaders::convert_to_1_0_request_header().
#define MIME_PRESENCE_CLIENT_IP (TOK_64_CONST(1) << 10) |
Definition at line 327 of file HdrToken.h.
Referenced by HttpTransact::add_client_ip_to_outgoing_request().
#define MIME_PRESENCE_CONNECTION (TOK_64_CONST(1) << 11) |
Definition at line 328 of file HdrToken.h.
Referenced by HttpTransact::handle_upgrade_request().
#define MIME_PRESENCE_CONTENT_ENCODING (TOK_64_CONST(1) << 12) |
Definition at line 329 of file HdrToken.h.
#define MIME_PRESENCE_CONTENT_LANGUAGE (TOK_64_CONST(1) << 13) |
Definition at line 330 of file HdrToken.h.
#define MIME_PRESENCE_CONTENT_LENGTH (TOK_64_CONST(1) << 14) |
Definition at line 331 of file HdrToken.h.
Referenced by HttpTransact::check_request_validity(), HttpTransact::handle_content_length_header(), and HttpTransact::initialize_state_variables_from_response().
#define MIME_PRESENCE_CONTENT_LOCATION (TOK_64_CONST(1) << 15) |
Definition at line 332 of file HdrToken.h.
#define MIME_PRESENCE_CONTENT_MD5 (TOK_64_CONST(1) << 16) |
Definition at line 333 of file HdrToken.h.
#define MIME_PRESENCE_CONTENT_RANGE (TOK_64_CONST(1) << 17) |
Definition at line 334 of file HdrToken.h.
#define MIME_PRESENCE_CONTENT_TYPE (TOK_64_CONST(1) << 18) |
Definition at line 335 of file HdrToken.h.
#define MIME_PRESENCE_COOKIE (TOK_64_CONST(1) << 19) |
Definition at line 336 of file HdrToken.h.
Referenced by do_cookies_prevent_caching(), and PrefetchBlaster::handleCookieHeaders().
#define MIME_PRESENCE_DATE (TOK_64_CONST(1) << 20) |
Definition at line 337 of file HdrToken.h.
Referenced by HttpTransact::check_response_validity().
#define MIME_PRESENCE_ETAG (TOK_64_CONST(1) << 21) |
Definition at line 338 of file HdrToken.h.
Referenced by HttpTransact::issue_revalidate().
#define MIME_PRESENCE_EXPIRES (TOK_64_CONST(1) << 22) |
Definition at line 339 of file HdrToken.h.
Referenced by HttpTransact::calculate_document_freshness_limit(), HttpTransact::handle_cache_operation_on_forward_server_response(), and HttpTransact::is_response_cacheable().
#define MIME_PRESENCE_FROM (TOK_64_CONST(1) << 23) |
Definition at line 340 of file HdrToken.h.
#define MIME_PRESENCE_HOST (TOK_64_CONST(1) << 24) |
Definition at line 341 of file HdrToken.h.
Referenced by HttpTransact::build_request(), HttpTransact::check_request_validity(), how_to_open_connection(), and HttpSM::redirect_request().
#define MIME_PRESENCE_IF_MATCH (TOK_64_CONST(1) << 25) |
Definition at line 342 of file HdrToken.h.
Referenced by is_request_conditional(), HttpTransactCache::match_response_to_request_conditionals(), and HttpTransactHeaders::remove_conditional_headers().
#define MIME_PRESENCE_IF_MODIFIED_SINCE (TOK_64_CONST(1) << 26) |
Definition at line 343 of file HdrToken.h.
Referenced by HttpTransact::initialize_state_variables_from_request(), is_request_conditional(), HttpTransact::issue_revalidate(), HttpTransactCache::match_response_to_request_conditionals(), HttpTransactHeaders::remove_conditional_headers(), and HttpTransact::what_is_document_freshness().
#define MIME_PRESENCE_IF_NONE_MATCH (TOK_64_CONST(1) << 27) |
Definition at line 344 of file HdrToken.h.
Referenced by HttpTransact::initialize_state_variables_from_request(), HttpTransact::issue_revalidate(), HttpTransactCache::match_response_to_request_conditionals(), and HttpTransactHeaders::remove_conditional_headers().
#define MIME_PRESENCE_IF_RANGE (TOK_64_CONST(1) << 28) |
Definition at line 345 of file HdrToken.h.
Referenced by is_request_conditional(), and HttpTransactCache::match_response_to_request_conditionals().
#define MIME_PRESENCE_IF_UNMODIFIED_SINCE (TOK_64_CONST(1) << 29) |
Definition at line 346 of file HdrToken.h.
Referenced by is_request_conditional(), HttpTransactCache::match_response_to_request_conditionals(), and HttpTransactHeaders::remove_conditional_headers().
#define MIME_PRESENCE_INT_DATA_INFO (TOK_64_CONST(1) << 62) |
Definition at line 383 of file HdrToken.h.
#define MIME_PRESENCE_KEEP_ALIVE (TOK_64_CONST(1) << 30) |
Definition at line 347 of file HdrToken.h.
#define MIME_PRESENCE_KEYWORDS (TOK_64_CONST(1) << 31) |
Definition at line 348 of file HdrToken.h.
#define MIME_PRESENCE_LAST_MODIFIED (TOK_64_CONST(1) << 32) |
Definition at line 349 of file HdrToken.h.
Referenced by HttpTransact::calculate_document_freshness_limit().
#define MIME_PRESENCE_LINES (TOK_64_CONST(1) << 33) |
Definition at line 350 of file HdrToken.h.
#define MIME_PRESENCE_LOCATION (TOK_64_CONST(1) << 34) |
Definition at line 351 of file HdrToken.h.
Referenced by PrefetchTransform::redirect().
#define MIME_PRESENCE_MAX_FORWARDS (TOK_64_CONST(1) << 35) |
Definition at line 352 of file HdrToken.h.
Referenced by HttpTransact::handle_trace_and_options_requests(), HttpTransact::is_request_cache_lookupable(), and HttpTransact::ModifyRequest().
#define MIME_PRESENCE_NONE TOK_64_CONST(0) |
Definition at line 385 of file HdrToken.h.
#define MIME_PRESENCE_PATH (TOK_64_CONST(1) << 36) |
Definition at line 353 of file HdrToken.h.
#define MIME_PRESENCE_PRAGMA (TOK_64_CONST(1) << 37) |
Definition at line 354 of file HdrToken.h.
#define MIME_PRESENCE_PROXY_AUTHENTICATE (TOK_64_CONST(1) << 38) |
Definition at line 355 of file HdrToken.h.
#define MIME_PRESENCE_PROXY_AUTHORIZATION (TOK_64_CONST(1) << 39) |
Definition at line 356 of file HdrToken.h.
Referenced by HttpSM::setup_server_send_request().
#define MIME_PRESENCE_PROXY_CONNECTION (TOK_64_CONST(1) << 40) |
Definition at line 357 of file HdrToken.h.
Referenced by HttpTransact::build_error_response().
#define MIME_PRESENCE_PUBLIC (TOK_64_CONST(1) << 41) |
Definition at line 358 of file HdrToken.h.
#define MIME_PRESENCE_RANGE (TOK_64_CONST(1) << 42) |
Definition at line 359 of file HdrToken.h.
Referenced by HttpTransact::build_response_from_cache(), HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::HandleCacheOpenReadMiss(), HttpTransact::is_request_cache_lookupable(), HttpTransact::is_request_likely_cacheable(), HttpTransactCache::match_response_to_request_conditionals(), and HttpTransact::OSDNSLookup().
#define MIME_PRESENCE_REFERER (TOK_64_CONST(1) << 43) |
Definition at line 360 of file HdrToken.h.
Referenced by RemapProcessor::finish_remap().
#define MIME_PRESENCE_SERVER (TOK_64_CONST(1) << 44) |
Definition at line 361 of file HdrToken.h.
#define MIME_PRESENCE_SET_COOKIE (TOK_64_CONST(1) << 45) |
Definition at line 362 of file HdrToken.h.
Referenced by do_cookies_prevent_caching(), and PrefetchBlaster::handleCookieHeaders().
#define MIME_PRESENCE_SUBJECT (TOK_64_CONST(1) << 46) |
Definition at line 363 of file HdrToken.h.
#define MIME_PRESENCE_SUMMARY (TOK_64_CONST(1) << 47) |
Definition at line 364 of file HdrToken.h.
#define MIME_PRESENCE_TE (TOK_64_CONST(1) << 48) |
Definition at line 365 of file HdrToken.h.
Referenced by HttpTransact::check_request_validity().
#define MIME_PRESENCE_TRANSFER_ENCODING (TOK_64_CONST(1) << 49) |
Definition at line 366 of file HdrToken.h.
Referenced by HttpTransact::check_request_validity(), and HttpTransact::initialize_state_variables_from_response().
#define MIME_PRESENCE_UNUSED_1 (TOK_64_CONST(1) << 56) |
Definition at line 376 of file HdrToken.h.
#define MIME_PRESENCE_UNUSED_2 (TOK_64_CONST(1) << 57) |
Definition at line 377 of file HdrToken.h.
#define MIME_PRESENCE_UNUSED_3 (TOK_64_CONST(1) << 58) |
Definition at line 378 of file HdrToken.h.
#define MIME_PRESENCE_UNUSED_4 (TOK_64_CONST(1) << 59) |
Definition at line 379 of file HdrToken.h.
#define MIME_PRESENCE_UNUSED_5 (TOK_64_CONST(1) << 60) |
Definition at line 380 of file HdrToken.h.
#define MIME_PRESENCE_UPGRADE (TOK_64_CONST(1) << 50) |
Definition at line 367 of file HdrToken.h.
Referenced by HttpTransact::handle_upgrade_request().
#define MIME_PRESENCE_USER_AGENT (TOK_64_CONST(1) << 51) |
Definition at line 368 of file HdrToken.h.
#define MIME_PRESENCE_VARY (TOK_64_CONST(1) << 52) |
Definition at line 369 of file HdrToken.h.
Referenced by HttpTransact::build_response(), HttpTransactCache::calculate_quality_of_match(), and HttpTransactCache::CalcVariability().
#define MIME_PRESENCE_VIA (TOK_64_CONST(1) << 53) |
Definition at line 370 of file HdrToken.h.
#define MIME_PRESENCE_WARNING (TOK_64_CONST(1) << 54) |
Definition at line 371 of file HdrToken.h.
#define MIME_PRESENCE_WWW_AUTHENTICATE (TOK_64_CONST(1) << 55) |
Definition at line 372 of file HdrToken.h.
Referenced by HttpTransact::is_response_cacheable(), and HttpSM::setup_server_send_request().
#define MIME_PRESENCE_XREF (TOK_64_CONST(1) << 61) |
Definition at line 382 of file HdrToken.h.
#define MIME_SLOTID_ACCEPT 0 |
Definition at line 266 of file HdrToken.h.
#define MIME_SLOTID_ACCEPT_CHARSET 1 |
Definition at line 267 of file HdrToken.h.
#define MIME_SLOTID_ACCEPT_ENCODING 2 |
Definition at line 268 of file HdrToken.h.
#define MIME_SLOTID_ACCEPT_LANGUAGE 3 |
Definition at line 269 of file HdrToken.h.
#define MIME_SLOTID_AGE 4 |
Definition at line 270 of file HdrToken.h.
#define MIME_SLOTID_AUTHORIZATION 5 |
Definition at line 271 of file HdrToken.h.
#define MIME_SLOTID_CACHE_CONTROL 6 |
Definition at line 272 of file HdrToken.h.
#define MIME_SLOTID_CLIENT_IP 7 |
Definition at line 273 of file HdrToken.h.
#define MIME_SLOTID_CONNECTION 8 |
Definition at line 274 of file HdrToken.h.
#define MIME_SLOTID_CONTENT_ENCODING 9 |
Definition at line 275 of file HdrToken.h.
#define MIME_SLOTID_CONTENT_LANGUAGE 10 |
Definition at line 276 of file HdrToken.h.
#define MIME_SLOTID_CONTENT_LENGTH 11 |
Definition at line 277 of file HdrToken.h.
#define MIME_SLOTID_CONTENT_TYPE 12 |
Definition at line 278 of file HdrToken.h.
#define MIME_SLOTID_COOKIE 13 |
Definition at line 279 of file HdrToken.h.
#define MIME_SLOTID_DATE 14 |
Definition at line 280 of file HdrToken.h.
#define MIME_SLOTID_EXPIRES 15 |
Definition at line 281 of file HdrToken.h.
#define MIME_SLOTID_IF_MATCH 16 |
Definition at line 282 of file HdrToken.h.
#define MIME_SLOTID_IF_MODIFIED_SINCE 17 |
Definition at line 283 of file HdrToken.h.
#define MIME_SLOTID_IF_NONE_MATCH 18 |
Definition at line 284 of file HdrToken.h.
#define MIME_SLOTID_IF_RANGE 19 |
Definition at line 285 of file HdrToken.h.
#define MIME_SLOTID_IF_UNMODIFIED_SINCE 20 |
Definition at line 286 of file HdrToken.h.
#define MIME_SLOTID_LAST_MODIFIED 21 |
Definition at line 287 of file HdrToken.h.
#define MIME_SLOTID_NONE -1 |
Definition at line 299 of file HdrToken.h.
Referenced by mime_hdr_field_find(), mime_hdr_get_accelerator_slotnum(), mime_hdr_set_accelerator_slotnum(), mime_hdr_set_accelerators_and_presence_bits(), and mime_hdr_unset_accelerators_and_presence_bits().
#define MIME_SLOTID_PRAGMA 22 |
Definition at line 288 of file HdrToken.h.
#define MIME_SLOTID_PROXY_CONNECTION 23 |
Definition at line 289 of file HdrToken.h.
#define MIME_SLOTID_RANGE 24 |
Definition at line 290 of file HdrToken.h.
#define MIME_SLOTID_SET_COOKIE 25 |
Definition at line 291 of file HdrToken.h.
#define MIME_SLOTID_TE 26 |
Definition at line 292 of file HdrToken.h.
#define MIME_SLOTID_TRANSFER_ENCODING 27 |
Definition at line 293 of file HdrToken.h.
#define MIME_SLOTID_USER_AGENT 28 |
Definition at line 294 of file HdrToken.h.
#define MIME_SLOTID_VARY 29 |
Definition at line 295 of file HdrToken.h.
#define MIME_SLOTID_VIA 30 |
Definition at line 296 of file HdrToken.h.
#define MIME_SLOTID_WWW_AUTHENTICATE 31 |
Definition at line 297 of file HdrToken.h.
#define SIZEOF | ( | x | ) | (sizeof (x) / sizeof (x[0])) |
Definition at line 43 of file HdrToken.h.
#define TOK_64_CONST | ( | x | ) | x ## LL |
Definition at line 315 of file HdrToken.h.
Referenced by hdrtoken_init(), and mime_hdr_describe().
enum HdrTokenInfoFlags |
Definition at line 88 of file HdrToken.h.
enum HdrTokenType |
HDRTOKEN_TYPE_OTHER | |
HDRTOKEN_TYPE_FIELD | |
HDRTOKEN_TYPE_METHOD | |
HDRTOKEN_TYPE_SCHEME | |
HDRTOKEN_TYPE_CACHE_CONTROL |
Definition at line 45 of file HdrToken.h.
int hdrtoken_index_to_flags | ( | int | wks_idx | ) | [inline] |
Definition at line 195 of file HdrToken.h.
References hdrtoken_is_valid_wks_idx(), hdrtoken_str_flags, and ink_assert.
Referenced by HttpTransactHeaders::copy_header_fields(), and MIMEField::supports_commas().
int hdrtoken_index_to_length | ( | int | wks_idx | ) | [inline] |
Definition at line 167 of file HdrToken.h.
References hdrtoken_is_valid_wks_idx(), hdrtoken_str_lengths, and ink_assert.
Referenced by http_hdr_method_get(), HttpTransactHeaders::insert_via_header_in_request(), HttpTransactHeaders::insert_via_header_in_response(), HttpSM::redirect_request(), and url_scheme_get().
uint64_t hdrtoken_index_to_mask | ( | int | wks_idx | ) | [inline] |
Definition at line 188 of file HdrToken.h.
References hdrtoken_is_valid_wks_idx(), hdrtoken_str_masks, and ink_assert.
Referenced by mime_field_presence_mask().
HdrTokenHeapPrefix* hdrtoken_index_to_prefix | ( | int | wks_idx | ) | [inline] |
Definition at line 202 of file HdrToken.h.
References hdrtoken_index_to_wks(), hdrtoken_is_valid_wks_idx(), hdrtoken_wks_to_prefix(), and ink_assert.
Referenced by hdrtoken_init().
int hdrtoken_index_to_slotid | ( | int | wks_idx | ) | [inline] |
Definition at line 181 of file HdrToken.h.
References hdrtoken_is_valid_wks_idx(), hdrtoken_str_slotids, and ink_assert.
Referenced by mime_hdr_set_accelerators_and_presence_bits(), and mime_hdr_unset_accelerators_and_presence_bits().
HdrTokenType hdrtoken_index_to_token_type | ( | int | wks_idx | ) | [inline] |
Definition at line 174 of file HdrToken.h.
References hdrtoken_is_valid_wks_idx(), hdrtoken_str_token_types, and ink_assert.
const char* hdrtoken_index_to_wks | ( | int | wks_idx | ) | [inline] |
Definition at line 160 of file HdrToken.h.
References hdrtoken_is_valid_wks_idx(), hdrtoken_strs, and ink_assert.
Referenced by hdrtoken_index_to_prefix(), hdrtoken_tokenize_dfa(), http_hdr_method_get(), HttpTransactHeaders::insert_via_header_in_request(), HttpTransactHeaders::insert_via_header_in_response(), mime_field_name_get(), mime_field_presence_get(), mime_hdr_presence_set(), mime_hdr_presence_unset(), IpAllow::Print(), process_mime_block_impl(), HttpTransact::process_quick_http_filter(), HttpSM::redirect_request(), url_length_get(), url_scheme_get(), url_scheme_set(), and url_to_string().
void hdrtoken_init | ( | ) |
Definition at line 591 of file HdrToken.cc.
References _hdrtoken_strs, ats_malloc(), DFA::compile(), HdrTokenFieldInfo::flags, hdrtoken_hash_init(), hdrtoken_index_to_prefix(), hdrtoken_tokenize_dfa(), ink_assert, ink_strlcpy(), HdrTokenFieldInfo::mask, HdrTokenTypeBinding::name, HdrTokenFieldInfo::name, RE_CASE_INSENSITIVE, SIZEOF, HdrTokenFieldInfo::slotid, snap_up_to_multiple(), TOK_64_CONST, HdrTokenTypeBinding::type, HdrTokenHeapPrefix::wks_idx, HdrTokenHeapPrefix::wks_info, HdrTokenHeapPrefix::wks_length, and HdrTokenHeapPrefix::wks_token_type.
Referenced by HdrTest::go(), mime_init(), and url_init().
bool hdrtoken_is_valid_wks_idx | ( | int | wks_idx | ) | [inline] |
Definition at line 141 of file HdrToken.h.
References hdrtoken_num_wks.
Referenced by _mime_hdr_field_list_search_by_wks(), hdrtoken_index_to_flags(), hdrtoken_index_to_length(), hdrtoken_index_to_mask(), hdrtoken_index_to_prefix(), hdrtoken_index_to_slotid(), hdrtoken_index_to_token_type(), hdrtoken_index_to_wks(), and process_mime_block_impl().
bool hdrtoken_is_wks | ( | const char * | str | ) | [inline] |
Definition at line 129 of file HdrToken.h.
References _hdrtoken_strs_heap_f, and _hdrtoken_strs_heap_l.
Referenced by hdrtoken_tokenize(), hdrtoken_wks_to_flags(), hdrtoken_wks_to_index(), hdrtoken_wks_to_length(), hdrtoken_wks_to_mask(), hdrtoken_wks_to_prefix(), hdrtoken_wks_to_slotid(), hdrtoken_wks_to_token_type(), HttpTransactHeaders::insert_supported_methods_in_response(), HTTPHdr::is_cache_control_set(), HttpTransactHeaders::is_this_a_hop_by_hop_header(), mime_hdr_field_find(), and MIMEField::name_set().
const char* hdrtoken_string_to_wks | ( | const char * | string | ) |
Definition at line 751 of file HdrToken.cc.
References hdrtoken_tokenize().
Referenced by HttpTransactCache::CalcVariability(), HttpTransact::check_request_validity(), http_init(), HttpTransact::initialize_state_variables_from_response(), mime_init(), mime_init_cache_control_cooking_masks(), and url_init().
const char* hdrtoken_string_to_wks | ( | const char * | string, | |
int | length | |||
) |
Definition at line 762 of file HdrToken.cc.
References hdrtoken_tokenize().
inkcoreapi int hdrtoken_tokenize | ( | const char * | string, | |
int | string_len, | |||
const char ** | wks_string_out = NULL | |||
) |
Definition at line 716 of file HdrToken.cc.
References Debug, HdrTokenHashBucket::hash, hash_to_slot(), hdrtoken_hash(), hdrtoken_is_wks(), hdrtoken_wks_to_index(), hdrtoken_wks_to_length(), ink_assert, and HdrTokenHashBucket::wks.
Referenced by MIMEHdr::field_create(), HttpTransact::handle_upgrade_request(), hdrtoken_string_to_wks(), http_parser_parse_req(), http_str_store(), HTTPHdr::method_set(), mime_field_create_named(), mime_hdr_prepare_for_value_set(), mime_hdr_reset_accelerators_and_presence_bits(), mime_parser_parse(), MIMEField::name_set(), MIMEHdrImpl::recompute_cooked_stuff(), URL::scheme_set(), and url_parse_scheme().
int hdrtoken_tokenize_dfa | ( | const char * | string, | |
int | string_len, | |||
const char ** | wks_string_out = NULL | |||
) |
Definition at line 693 of file HdrToken.cc.
References hdrtoken_index_to_wks(), and DFA::match().
Referenced by hdrtoken_hash_init(), and hdrtoken_init().
int hdrtoken_wks_to_flags | ( | const char * | wks | ) | [inline] |
Definition at line 248 of file HdrToken.h.
References HdrTokenFieldInfo::flags, hdrtoken_is_wks(), hdrtoken_wks_to_prefix(), ink_assert, and HdrTokenHeapPrefix::wks_info.
Referenced by HttpTransactHeaders::is_this_a_hop_by_hop_header().
int hdrtoken_wks_to_index | ( | const char * | wks | ) | [inline] |
Definition at line 212 of file HdrToken.h.
References hdrtoken_is_wks(), hdrtoken_wks_to_prefix(), ink_assert, and HdrTokenHeapPrefix::wks_idx.
Referenced by hdrtoken_tokenize(), http_init(), http_parser_parse_req(), HttpTransactHeaders::insert_supported_methods_in_response(), mime_init(), MIMEField::name_set(), and url_init().
int hdrtoken_wks_to_length | ( | const char * | wks | ) | [inline] |
Definition at line 219 of file HdrToken.h.
References hdrtoken_is_wks(), hdrtoken_wks_to_prefix(), ink_assert, and HdrTokenHeapPrefix::wks_length.
Referenced by hdrtoken_tokenize(), http_init(), HttpTransactHeaders::insert_supported_methods_in_response(), mime_init(), and url_init().
uint64_t hdrtoken_wks_to_mask | ( | const char * | wks | ) | [inline] |
Definition at line 240 of file HdrToken.h.
References hdrtoken_is_wks(), hdrtoken_wks_to_prefix(), ink_assert, HdrTokenFieldInfo::mask, and HdrTokenHeapPrefix::wks_info.
Referenced by mime_field_presence_mask().
HdrTokenHeapPrefix* hdrtoken_wks_to_prefix | ( | const char * | wks | ) | [inline] |
Definition at line 150 of file HdrToken.h.
References hdrtoken_is_wks(), and ink_assert.
Referenced by hdrtoken_index_to_prefix(), hdrtoken_wks_to_flags(), hdrtoken_wks_to_index(), hdrtoken_wks_to_length(), hdrtoken_wks_to_mask(), hdrtoken_wks_to_slotid(), hdrtoken_wks_to_token_type(), HTTPHdr::is_cache_control_set(), mime_hdr_field_find(), mime_init_cache_control_cooking_masks(), and MIMEHdrImpl::recompute_cooked_stuff().
int hdrtoken_wks_to_slotid | ( | const char * | wks | ) | [inline] |
Definition at line 233 of file HdrToken.h.
References hdrtoken_is_wks(), hdrtoken_wks_to_prefix(), ink_assert, HdrTokenFieldInfo::slotid, and HdrTokenHeapPrefix::wks_info.
int hdrtoken_wks_to_token_type | ( | const char * | wks | ) | [inline] |
Definition at line 226 of file HdrToken.h.
References hdrtoken_is_wks(), hdrtoken_wks_to_prefix(), ink_assert, and HdrTokenHeapPrefix::wks_token_type.
Referenced by url_parse_scheme().
int hdrtoken_num_wks |
Definition at line 330 of file HdrToken.cc.
Referenced by hdrtoken_is_valid_wks_idx().
uint32_t hdrtoken_str_flags[] |
Definition at line 337 of file HdrToken.cc.
Referenced by hdrtoken_index_to_flags().
int hdrtoken_str_lengths[] |
Definition at line 333 of file HdrToken.cc.
Referenced by hdrtoken_index_to_length().
uint64_t hdrtoken_str_masks[] |
Definition at line 336 of file HdrToken.cc.
Referenced by hdrtoken_index_to_mask().
int32_t hdrtoken_str_slotids[] |
Definition at line 335 of file HdrToken.cc.
Referenced by hdrtoken_index_to_slotid().
Definition at line 334 of file HdrToken.cc.
Referenced by hdrtoken_index_to_token_type().
const char* hdrtoken_strs[] |
Definition at line 332 of file HdrToken.cc.
Referenced by hdrtoken_index_to_wks().
Definition at line 339 of file HdrToken.cc.