#include <HttpTransact.h>
Definition at line 268 of file HttpTransact.h.
typedef struct HttpTransact::_CacheDirectives HttpTransact::CacheDirectives |
typedef struct HttpTransact::_CacheLookupInfo HttpTransact::CacheLookupInfo |
typedef struct HttpTransact::_CurrentInfo HttpTransact::CurrentInfo |
typedef struct HttpTransact::_DNSLookupInfo HttpTransact::DNSLookupInfo |
typedef struct HttpTransact::_HeaderInfo HttpTransact::HeaderInfo |
typedef struct HttpTransact::_RedirectInfo HttpTransact::RedirectInfo |
typedef struct HttpTransact::_SquidLogInfo HttpTransact::SquidLogInfo |
typedef void(* HttpTransact::TransactFunc_t)(HttpTransact::State *) |
Definition at line 607 of file HttpTransact.h.
Definition at line 278 of file HttpTransact.h.
AUTHENTICATION_SUCCESS | |
AUTHENTICATION_MUST_REVALIDATE | |
AUTHENTICATION_MUST_PROXY | |
AUTHENTICATION_CACHE_AUTH |
Definition at line 286 of file HttpTransact.h.
Definition at line 294 of file HttpTransact.h.
Definition at line 576 of file HttpTransact.h.
CACHE_LOOKUP_NONE | |
CACHE_LOOKUP_MISS | |
CACHE_LOOKUP_DOC_BUSY | |
CACHE_LOOKUP_HIT_STALE | |
CACHE_LOOKUP_HIT_WARNING | |
CACHE_LOOKUP_HIT_FRESH | |
CACHE_LOOKUP_SKIPPED |
Definition at line 537 of file HttpTransact.h.
Definition at line 312 of file HttpTransact.h.
NO_CACHE_WRITE | |
CACHE_WRITE_LOCK_MISS | |
CACHE_WRITE_IN_PROGRESS | |
CACHE_WRITE_ERROR | |
CACHE_WRITE_COMPLETE |
Definition at line 424 of file HttpTransact.h.
Definition at line 320 of file HttpTransact.h.
Definition at line 335 of file HttpTransact.h.
RETRY_EXPANDED_NAME | |
EXPANSION_FAILED | |
EXPANSION_NOT_ALLOWED | |
DNS_ATTEMPTS_EXHAUSTED | |
NO_PARENT_PROXY_EXPANSION | |
TOTAL_HOST_NAME_EXPANSION_TYPES |
Definition at line 342 of file HttpTransact.h.
REQ_FLAVOR_INTERCEPTED | |
REQ_FLAVOR_REVPROXY | |
REQ_FLAVOR_FWDPROXY | |
REQ_FLAVOR_SCHEDULED_UPDATE |
Definition at line 433 of file HttpTransact.h.
Definition at line 352 of file HttpTransact.h.
Definition at line 558 of file HttpTransact.h.
ORIGIN_SERVER | |
UNDEFINED_LOOKUP | |
ICP_SUGGESTED_HOST | |
PARENT_PROXY | |
INCOMING_ROUTER | |
HOST_NONE |
Definition at line 359 of file HttpTransact.h.
Definition at line 369 of file HttpTransact.h.
RANGE_NONE | |
RANGE_REQUESTED | |
RANGE_NOT_SATISFIABLE | |
RANGE_NOT_HANDLED | |
RANGE_NOT_TRANSFORM_REQUESTED |
Definition at line 567 of file HttpTransact.h.
Definition at line 376 of file HttpTransact.h.
Definition at line 393 of file HttpTransact.h.
Definition at line 408 of file HttpTransact.h.
SOURCE_NONE | |
SOURCE_HTTP_ORIGIN_SERVER | |
SOURCE_RAW_ORIGIN_SERVER | |
SOURCE_CACHE | |
SOURCE_TRANSFORM | |
SOURCE_INTERNAL |
Definition at line 444 of file HttpTransact.h.
Definition at line 458 of file HttpTransact.h.
Definition at line 517 of file HttpTransact.h.
UPDATE_CACHED_OBJECT_NONE | |
UPDATE_CACHED_OBJECT_PREPARE | |
UPDATE_CACHED_OBJECT_CONTINUE | |
UPDATE_CACHED_OBJECT_ERROR | |
UPDATE_CACHED_OBJECT_SUCCEED | |
UPDATE_CACHED_OBJECT_FAIL |
Definition at line 548 of file HttpTransact.h.
Definition at line 271 of file HttpTransact.h.
Definition at line 524 of file HttpTransact.h.
Definition at line 5077 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, OverridableHttpConfigParams::anonymize_insert_client_ip, OverridableHttpConfigParams::anonymize_remove_client_ip, ats_ip_ntop(), ats_is_ip(), HttpTransact::State::client_info, DebugTxn, MIMEHdr::field_find(), MIMEHdr::field_value_append(), OverridableHttpConfigParams::insert_squid_x_forwarded_for, MIME_FIELD_CLIENT_IP, MIME_FIELD_X_FORWARDED_FOR, MIME_LEN_CLIENT_IP, MIME_LEN_X_FORWARDED_FOR, MIME_PRESENCE_CLIENT_IP, MIMEHdr::presence(), IpEndpoint::sa, HttpTransact::State::txn_conf, and MIMEHdr::value_set().
Referenced by build_request().
void HttpTransact::add_new_stat_block | ( | State * | s | ) | [static] |
Definition at line 8723 of file HttpTransact.cc.
References Arena::alloc(), HttpTransact::State::arena, HttpTransact::State::current_stats, DebugTxn, HttpTransact::StatBlock::init(), ink_assert, HttpTransact::StatBlock::next, HttpTransact::StatBlock::next_insert, and StatBlockEntries.
Referenced by update_stat().
HttpTransact::Authentication_t HttpTransact::AuthenticationNeeded | ( | const OverridableHttpConfigParams * | p, | |
HTTPHdr * | client_request, | |||
HTTPHdr * | obj_response | |||
) | [static] |
Definition at line 7449 of file HttpTransact.cc.
References AUTHENTICATION_CACHE_AUTH, AUTHENTICATION_SUCCESS, OverridableHttpConfigParams::cache_ignore_auth, MIMEHdr::field_find(), HTTP_VALUE_MUST_REVALIDATE, HTTP_VALUE_PROXY_REVALIDATE, HTTP_VALUE_PUBLIC, HTTP_WKSIDX_GET, HTTPHdr::is_cache_control_set(), HTTPHdr::method_get_wksidx(), MIME_PRESENCE_AUTHORIZATION, and MIMEHdr::presence().
Referenced by HandleCacheOpenReadHit(), is_stale_cache_response_returnable(), and need_to_revalidate().
void HttpTransact::BadRequest | ( | State * | s | ) | [static] |
Definition at line 588 of file HttpTransact.cc.
References bootstrap_state_variables_from_request(), build_error_response(), HttpTransact::_HeaderInfo::client_request, DebugTxn, HttpTransact::State::hdr_info, HTTP_STATUS_BAD_REQUEST, SM_ACTION_SEND_ERROR_CACHE_NOOP, and TRANSACT_RETURN.
Referenced by HttpSM::state_read_client_request_header().
void HttpTransact::bootstrap_state_variables_from_request | ( | State * | s, | |
HTTPHdr * | incoming_request | |||
) | [static] |
Definition at line 5466 of file HttpTransact.cc.
References HttpTransact::State::client_info, HttpTransact::State::client_request_time, HttpTransact::State::current, HttpTransact::ConnectionAttributes::http_version, ink_cluster_time(), HttpTransact::_CurrentInfo::now, and HTTPHdr::version_get().
Referenced by BadRequest(), HandleBlindTunnel(), and ModifyRequest().
void HttpTransact::build_error_response | ( | State * | s, | |
HTTPStatus | status_code, | |||
const char * | reason_phrase_or_null, | |||
const char * | error_body_type, | |||
const char * | format, | |||
... | ||||
) | [static] |
Definition at line 7948 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, HttpTransact::State::arena, ats_ip_ntop(), build_response(), HttpTransact::State::cause_of_death_errno, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpSM::client_request_body_bytes, HttpTransact::_HeaderInfo::client_response, CongestionEntry::client_retry_after(), HttpTransact::State::congestion_control_crat, CONNECTION_ERROR, HttpTransact::State::current, Log::error(), HttpConfigParams::errors_log_error_pages, HttpBodyFactory::fabricate_with_old_api(), MIMEHdr::field_delete(), HttpTransact::State::free_internal_msg_buffer(), get_error_string(), HttpTransact::State::hdr_info, HttpTransact::State::http_config_param, http_hdr_reason_lookup(), HTTP_STATUS_BAD_GATEWAY, HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_GATEWAY_TIMEOUT, HTTP_STATUS_HTTPVER_NOT_SUPPORTED, HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_MOVED_TEMPORARILY, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, HTTP_STATUS_SERVICE_UNAVAILABLE, HTTP_STATUS_TEMPORARY_REDIRECT, HTTP_STATUS_UNAUTHORIZED, HttpTransact::ConnectionAttributes::http_version, HTTP_WKSIDX_CONNECT, HttpTransact::State::internal_msg_buffer, HttpTransact::State::internal_msg_buffer_fast_allocator_size, HttpTransact::State::internal_msg_buffer_index, HttpTransact::State::internal_msg_buffer_size, HttpTransact::ConnectionAttributes::keep_alive, HttpTransact::State::method, MIME_FIELD_CACHE_CONTROL, MIME_FIELD_CONTENT_LANGUAGE, MIME_FIELD_CONTENT_TYPE, MIME_FIELD_EXPIRES, MIME_FIELD_LAST_MODIFIED, MIME_FIELD_LOCATION, MIME_FIELD_PROXY_CONNECTION, MIME_FIELD_RETRY_AFTER, MIME_FIELD_USER_AGENT, MIME_LEN_CACHE_CONTROL, MIME_LEN_CONTENT_LANGUAGE, MIME_LEN_CONTENT_TYPE, MIME_LEN_EXPIRES, MIME_LEN_LAST_MODIFIED, MIME_LEN_LOCATION, MIME_LEN_PROXY_CONNECTION, MIME_LEN_RETRY_AFTER, MIME_LEN_USER_AGENT, MIME_PRESENCE_PROXY_CONNECTION, HttpTransact::State::next_action, HttpTransact::State::pCongestionEntry, MIMEHdr::presence(), HttpTransact::State::remap_redirect, HttpTransact::_HeaderInfo::request_content_length, IpEndpoint::sa, SET_VIA_STRING, HttpTransact::State::source, HttpTransact::_CurrentInfo::state, HttpTransact::State::state_machine, Arena::str_free(), HttpTransact::_HeaderInfo::trust_response_cl, unlikely, HTTPHdr::url_string_get(), HTTPHdr::valid(), MIMEHdr::value_get(), MIMEHdr::value_set(), MIMEHdr::value_set_int(), VIA_CLIENT_ERROR, VIA_CLIENT_REQUEST, VIA_ERROR_AUTHORIZATION, VIA_ERROR_CONNECTION, VIA_ERROR_DNS_FAILURE, VIA_ERROR_FORBIDDEN, VIA_ERROR_HEADER_SYNTAX, VIA_ERROR_SERVER, VIA_ERROR_TIMEOUT, and VIA_ERROR_TYPE.
Referenced by BadRequest(), build_response_from_cache(), EndRemapRequest(), handle_cache_operation_on_forward_server_response(), handle_no_cache_operation_on_forward_server_response(), handle_parent_died(), handle_server_died(), handle_upgrade_request(), handle_websocket_upgrade_pre_remap(), HandleBlindTunnel(), HandleCacheOpenReadMiss(), HandleFiltering(), handleIfRedirect(), HandlePushError(), HandleRequest(), is_request_valid(), OSDNSLookup(), ReDNSRoundRobin(), and will_this_request_self_loop().
void HttpTransact::build_redirect_response | ( | State * | s | ) | [static] |
Definition at line 8147 of file HttpTransact.cc.
References HttpTransact::State::arena, build_response(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, DebugTxn, HttpTransact::State::dns_info, HttpBodyFactory::fabricate_with_old_api_build_va(), HttpTransact::State::free_internal_msg_buffer(), HttpTransact::State::hdr_info, URL::host_get(), URL::host_set(), HttpTransact::State::http_config_param, http_hdr_reason_lookup(), HttpTransact::ConnectionAttributes::http_version, OverridableHttpConfigParams::insert_response_via_string, HttpTransact::State::internal_msg_buffer, HttpTransact::State::internal_msg_buffer_fast_allocator_size, HttpTransact::State::internal_msg_buffer_index, HttpTransact::State::internal_msg_buffer_size, HttpTransact::_DNSLookupInfo::lookup_name, MIME_FIELD_CONTENT_TYPE, MIME_FIELD_LOCATION, MIME_LEN_CONTENT_TYPE, MIME_LEN_LOCATION, HttpConfigParams::proxy_response_via_string, HttpConfigParams::proxy_response_via_string_len, MIMEHdr::set_content_length(), Arena::str_free(), URL::string_get(), HttpTransact::State::txn_conf, HTTPHdr::url_get(), MIMEHdr::value_append(), and MIMEHdr::value_set().
Referenced by OSDNSLookup().
void HttpTransact::build_request | ( | State * | s, | |
HTTPHdr * | base_request, | |||
HTTPHdr * | outgoing_request, | |||
HTTPVersion | outgoing_version | |||
) | [static] |
Definition at line 7642 of file HttpTransact.cc.
References add_client_ip_to_outgoing_request(), HttpTransactHeaders::add_global_user_agent_header_to_request(), HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_when_to_revalidate, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::cop_test_page, URL::copy(), HttpTransactHeaders::copy_header_fields(), HttpTransact::State::current, DebugTxn, DUMP_HEADER, OverridableHttpConfigParams::fwd_proxy_auth_to_parent, GENERIC_PROXY, handle_request_keep_alive_headers(), HttpTransact::State::hdr_info, URL::host_get(), HttpTransact::State::http_config_param, HTTP_INCREMENT_TRANS_STAT, http_outgoing_requests_stat, ink_assert, ink_cluster_time(), OverridableHttpConfigParams::insert_request_via_string, HttpTransactHeaders::insert_via_header_in_request(), is_request_likely_cacheable(), HTTPHdr::is_target_in_url(), memcpy, MIME_FIELD_HOST, MIME_LEN_HOST, MIME_PRESENCE_HOST, HttpTransact::_CurrentInfo::mode, HttpTransact::State::next_hop_scheme, HttpTransact::_CurrentInfo::now, HttpTransact::State::orig_scheme, HttpTransact::_CacheLookupInfo::original_url, PARENT_PROXY, URL::port_get(), MIMEHdr::presence(), HttpTransact::_RedirectInfo::redirect_in_process, HttpTransact::State::redirect_info, HttpTransact::_RedirectInfo::redirect_url, HttpTransactHeaders::remove_100_continue_headers(), HttpTransactHeaders::remove_conditional_headers(), HttpTransactHeaders::remove_host_name_from_url(), HttpTransactHeaders::remove_privacy_headers_from_request(), HttpTransact::State::request_sent_time, HttpTransact::_CurrentInfo::request_to, HttpTransact::State::response_received_time, HttpConfigParams::send_100_continue_response, HttpTransact::_CurrentInfo::server, HttpTransact::State::server_info, HTTPHdr::set_url_target_from_host_field(), HttpTransact::State::state_machine_id, HttpTransact::State::txn_conf, url_canonicalize_port(), HTTPHdr::url_get(), URL_TYPE_HTTP, URL_WKSIDX_HTTP, URL_WKSIDX_HTTPS, URL_WKSIDX_WS, URL_WKSIDX_WSS, URL::valid(), MIMEHdr::value_set(), and HTTPHdr::version_set().
Referenced by HandleCacheOpenReadHit(), HandleCacheOpenReadMiss(), HandleICPLookup(), LookupSkipOpenServer(), PPDNSLookup(), and setup_plugin_request_intercept().
void HttpTransact::build_response | ( | State * | s, | |
HTTPHdr * | base_response, | |||
HTTPHdr * | outgoing_response, | |||
HTTPVersion | outgoing_version | |||
) | [static] |
Definition at line 7772 of file HttpTransact.cc.
References build_response(), and HTTP_STATUS_NONE.
void HttpTransact::build_response | ( | State * | s, | |
HTTPHdr * | outgoing_response, | |||
HTTPVersion | outgoing_version, | |||
HTTPStatus | status_code, | |||
const char * | reason_phrase = NULL | |||
) | [static] |
Definition at line 7780 of file HttpTransact.cc.
References build_response().
void HttpTransact::build_response | ( | State * | s, | |
HTTPHdr * | base_response, | |||
HTTPHdr * | outgoing_response, | |||
HTTPVersion | outgoing_version, | |||
HTTPStatus | status_code, | |||
const char * | reason_phrase = NULL | |||
) | [static] |
Definition at line 7788 of file HttpTransact.cc.
References HttpTransactHeaders::add_server_header_to_response(), HttpTransactHeaders::build_base_response(), HttpTransactHeaders::convert_response(), HttpTransact::State::cop_test_page, HttpTransactHeaders::copy_header_fields(), HttpTransact::State::current, Debug, diags, DUMP_HEADER, HttpConfigParams::enable_http_stats, MIMEHdr::field_find(), OverridableHttpConfigParams::fwd_proxy_auth_to_parent, HttpTransactHeaders::generate_and_set_squid_codes(), handle_content_length_header(), handle_response_keep_alive_headers(), HttpTransact::State::hdr_info, HttpTransact::State::http_config_param, http_hdr_reason_lookup(), HTTP_STATUS_NONE, HTTP_STATUS_NOT_MODIFIED, HTTP_STATUS_PRECONDITION_FAILED, HTTP_STATUS_RANGE_NOT_SATISFIABLE, OverridableHttpConfigParams::insert_age_in_response, HttpTransactHeaders::insert_hsts_header_in_response(), OverridableHttpConfigParams::insert_response_via_string, HttpTransactHeaders::insert_time_and_age_headers_in_response(), HttpTransactHeaders::insert_via_header_in_response(), is_response_body_precluded(), HttpTransact::State::method, MIME_FIELD_CACHE_CONTROL, MIME_FIELD_CONTENT_LOCATION, MIME_FIELD_ETAG, MIME_FIELD_EXPIRES, MIME_FIELD_VARY, MIME_LEN_CACHE_CONTROL, MIME_LEN_CONTENT_LOCATION, MIME_LEN_ETAG, MIME_LEN_EXPIRES, MIME_LEN_VARY, MIME_PRESENCE_VARY, HttpTransact::State::next_hop_scheme, HttpTransact::_CurrentInfo::now, Diags::on(), HttpTransact::State::orig_scheme, MIMEHdr::presence(), OverridableHttpConfigParams::proxy_response_hsts_max_age, HttpTransact::State::request_sent_time, HttpTransact::State::response_received_time, response_url_remap(), HttpTransact::State::squid_codes, HttpTransact::State::state_machine_id, HTTPHdr::status_get(), HttpTransact::_HeaderInfo::trust_response_cl, HttpTransact::State::txn_conf, URL_WKSIDX_HTTP, URL_WKSIDX_HTTPS, MIMEHdr::value_append(), MIMEField::value_get(), and HttpTransact::State::via_string.
Referenced by build_error_response(), build_redirect_response(), build_response(), build_response_from_cache(), delete_all_document_alternates_and_return(), handle_cache_operation_on_forward_server_response(), handle_forward_server_connection_open(), handle_no_cache_operation_on_forward_server_response(), handle_trace_and_options_requests(), handle_transform_ready(), HandleApiErrorJump(), HandlePushTunnelSuccess(), HandleStatPage(), and OriginServerRawOpen().
void HttpTransact::build_response_copy | ( | State * | s, | |
HTTPHdr * | base_response, | |||
HTTPHdr * | outgoing_response, | |||
HTTPVersion | outgoing_version | |||
) | [static] |
Definition at line 4020 of file HttpTransact.cc.
References HttpTransactHeaders::add_server_header_to_response(), HttpTransactHeaders::convert_response(), HttpTransact::State::cop_test_page, HttpTransactHeaders::copy_header_fields(), HttpTransact::State::current, DUMP_HEADER, OverridableHttpConfigParams::fwd_proxy_auth_to_parent, HttpTransact::_CurrentInfo::now, HttpTransact::State::state_machine_id, and HttpTransact::State::txn_conf.
Referenced by handle_100_continue_response().
void HttpTransact::build_response_from_cache | ( | State * | s, | |
HTTPWarningCode | warning_code | |||
) | [static] |
Definition at line 2792 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::api_resp_cacheable, HttpTransact::State::api_update_cached_object, build_error_response(), build_response(), HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, DebugTxn, delete_warning_value(), HttpSM::do_range_setup_if_necessary(), HttpSM::do_transform_open(), HttpTransact::State::force_dns, HandleCacheOpenReadMiss(), HttpTransact::State::hdr_info, HttpTransact::State::http_config_param, HTTP_STATUS_BAD_GATEWAY, HTTP_STATUS_NOT_MODIFIED, HTTP_STATUS_OK, HTTP_STATUS_PRECONDITION_FAILED, HTTP_STATUS_RANGE_NOT_SATISFIABLE, HttpTransact::ConnectionAttributes::http_version, HTTP_WARNING_CODE_NONE, HTTP_WKSIDX_GET, HTTP_WKSIDX_HEAD, ink_assert, HttpTransactHeaders::insert_warning_header(), HttpTransactCache::match_response_to_request_conditionals(), HttpTransact::State::method, MIME_PRESENCE_RANGE, HttpTransact::State::next_action, HttpTransact::_CacheLookupInfo::object_read, HttpTransact::_CacheLookupInfo::object_store, OSDNSLookup(), MIMEHdr::presence(), RANGE_NOT_HANDLED, RANGE_NOT_SATISFIABLE, HttpTransact::State::range_setup, set_header_for_transform(), SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, HttpTransact::State::state_machine, TRANSACT_RETURN, HttpTransact::_HeaderInfo::transform_response, UPDATE_CACHED_OBJECT_CONTINUE, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_HIT_CONDITIONAL, VIA_DETAIL_HIT_SERVED, and VIA_DETAIL_MISS_CONDITIONAL.
Referenced by handle_server_connection_not_open(), and HandleCacheOpenReadHit().
int HttpTransact::calculate_document_freshness_limit | ( | State * | s, | |
HTTPHdr * | response, | |||
time_t | response_date, | |||
bool * | heuristic | |||
) | [static] |
Definition at line 7063 of file HttpTransact.cc.
References OverridableHttpConfigParams::cache_guaranteed_max_lifetime, OverridableHttpConfigParams::cache_guaranteed_min_lifetime, OverridableHttpConfigParams::cache_heuristic_lm_factor, OverridableHttpConfigParams::cache_heuristic_max_lifetime, OverridableHttpConfigParams::cache_heuristic_min_lifetime, DebugTxn, HttpSM::get_cache_sm(), MIMEHdr::get_cooked_cc_mask(), MIMEHdr::get_cooked_cc_max_age(), MIMEHdr::get_cooked_cc_s_maxage(), MIMEHdr::get_expires(), MIMEHdr::get_last_modified(), ink_assert, HttpCacheSM::is_readwhilewrite_inprogress(), max(), MIME_COOKED_MASK_CC_MAX_AGE, MIME_COOKED_MASK_CC_S_MAXAGE, MIME_PRESENCE_EXPIRES, MIME_PRESENCE_LAST_MODIFIED, min(), NUM_SECONDS_IN_ONE_YEAR, HttpTransact::State::plugin_set_expire_time, MIMEHdr::presence(), HttpTransact::State::request_sent_time, HttpTransact::State::state_machine, HttpTransact::State::txn_conf, and UNDEFINED_TIME.
Referenced by what_is_document_freshness().
int HttpTransact::calculate_freshness_fuzz | ( | State * | s, | |
int | fresh_limit | |||
) | [static] |
Definition at line 7190 of file HttpTransact.cc.
References DebugTxn, OverridableHttpConfigParams::freshness_fuzz_min_time, OverridableHttpConfigParams::freshness_fuzz_prob, OverridableHttpConfigParams::freshness_fuzz_time, EThread::generator, max(), min(), NUM_SECONDS_IN_ONE_YEAR, InkRand::random(), this_ethread(), and HttpTransact::State::txn_conf.
Referenced by what_is_document_freshness().
void HttpTransact::CallOSDNSLookup | ( | State * | s | ) | [static] |
Definition at line 2448 of file HttpTransact.cc.
References OSDNSLookup(), SM_ACTION_DNS_LOOKUP, and TRANSACT_RETURN.
Referenced by DecideCacheLookup(), and HandleCacheOpenReadHitFreshness().
void HttpTransact::change_response_header_because_of_range_request | ( | State * | s, | |
HTTPHdr * | header | |||
) | [static] |
Definition at line 8793 of file HttpTransact.cc.
References _RangeRecord::_end, _RangeRecord::_start, HttpTransact::State::cache_info, Debug, MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_delete(), MIMEHdr::field_find(), http_hdr_reason_lookup(), HTTP_STATUS_PARTIAL_CONTENT, HdrHeapSDKHandle::m_heap, MIMEHdr::m_mime, MIME_FIELD_CONTENT_RANGE, MIME_FIELD_CONTENT_TYPE, MIME_LEN_CONTENT_RANGE, MIME_LEN_CONTENT_TYPE, HttpTransact::State::num_range_fields, HttpTransact::_CacheLookupInfo::object_read, HTTPInfo::object_size_get(), HttpTransact::State::range_output_cl, range_type, HttpTransact::State::ranges, HTTPHdr::reason_set(), MIMEHdr::set_content_length(), HTTPHdr::status_set(), HTTPInfo::valid(), MIMEField::value_append(), and MIMEField::value_set().
Referenced by handle_content_length_header().
HttpTransact::RequestError_t HttpTransact::check_request_validity | ( | State * | s, | |
HTTPHdr * | incoming_hdr | |||
) | [static] |
Definition at line 5140 of file HttpTransact.cc.
References HttpTransact::State::arena, CHUNKED_ENCODING, HttpTransact::State::client_info, HttpConfigParams::connect_ports, DebugTxn, HTTPValTE::encoding, MIMEHdr::field_find(), Arena::free(), MIMEHdr::get_content_length(), HdrCsvIter::get_first(), HdrCsvIter::get_next(), HttpTransact::State::hdr_info, hdrtoken_string_to_wks(), HTTPHdr::host_get(), HttpTransact::State::http_config_param, HTTP_INCREMENT_TRANS_STAT, http_missing_host_hdr_stat, http_parse_te(), HTTP_UNDEFINED_CL, HTTP_VALUE_CHUNKED, HTTP_VALUE_IDENTITY, HTTP_WKSIDX_CONNECT, HTTP_WKSIDX_GET, HTTP_WKSIDX_POST, HTTP_WKSIDX_PUSH, HTTP_WKSIDX_PUT, HTTP_WKSIDX_TRACE, is_port_in_range(), HttpTransactHeaders::is_request_proxy_authorized(), HttpTransactHeaders::is_this_method_supported(), HttpTransact::State::is_websocket, HTTPHdr::method_get_wksidx(), MIME_FIELD_TE, MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TE, MIME_LEN_TRANSFER_ENCODING, MIME_PRESENCE_CONTENT_LENGTH, MIME_PRESENCE_HOST, MIME_PRESENCE_TE, MIME_PRESENCE_TRANSFER_ENCODING, URL::port_get(), OverridableHttpConfigParams::post_check_content_length_enabled, MIMEHdr::presence(), HTTPValTE::qvalue, HttpTransact::_HeaderInfo::request_content_length, URL::scheme_get_wksidx(), HttpTransact::ConnectionAttributes::transfer_encoding, HttpTransact::State::transparent_passthrough, HttpTransact::State::txn_conf, HTTPHdr::url_get(), URL_WKSIDX_HTTP, URL_WKSIDX_HTTPS, URL_WKSIDX_WS, URL_WKSIDX_WSS, and HTTPHdr::version_get().
Referenced by is_request_valid().
HttpTransact::ResponseError_t HttpTransact::check_response_validity | ( | State * | s, | |
HTTPHdr * | incoming_hdr | |||
) | [static] |
Definition at line 5266 of file HttpTransact.cc.
References HttpTransact::State::current, DebugTxn, did_forward_server_send_0_9_response(), MIMEHdr::get_date(), HTTP_STATUS_INTERNAL_SERVER_ERROR, ink_assert, MIME_PRESENCE_DATE, HttpTransact::State::next_hop_scheme, HttpTransact::_CurrentInfo::now, MIMEHdr::presence(), MIMEHdr::set_date(), HTTPHdr::status_get(), HTTPHdr::type_get(), URL_WKSIDX_HTTP, and URL_WKSIDX_HTTPS.
Referenced by is_response_valid().
void HttpTransact::client_result_stat | ( | State * | s, | |
ink_hrtime | total_time, | |||
ink_hrtime | request_process_time | |||
) | [static] |
Definition at line 8343 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::abort, ABORTED, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, CLIENT_TRANSACTION_RESULT_ERROR_ABORT, CLIENT_TRANSACTION_RESULT_ERROR_CONNECT_FAIL, CLIENT_TRANSACTION_RESULT_ERROR_OTHER, CLIENT_TRANSACTION_RESULT_ERROR_POSSIBLE_ABORT, CLIENT_TRANSACTION_RESULT_HIT_FRESH, CLIENT_TRANSACTION_RESULT_HIT_REVALIDATED, CLIENT_TRANSACTION_RESULT_MISS_CHANGED, CLIENT_TRANSACTION_RESULT_MISS_CLIENT_NO_CACHE, CLIENT_TRANSACTION_RESULT_MISS_COLD, CLIENT_TRANSACTION_RESULT_MISS_UNCACHABLE, DebugTxn, DIDNOT_ABORT, GET_VIA_STRING, HttpTransact::State::hdr_info, http_cache_hit_fresh_stat, http_cache_hit_ims_stat, http_cache_hit_mem_fresh_stat, http_cache_hit_reval_stat, http_cache_hit_stale_served_stat, http_cache_miss_changed_stat, http_cache_miss_client_no_cache_stat, http_cache_miss_cold_stat, http_cache_miss_ims_stat, http_cache_miss_uncacheable_stat, http_cache_read_error_stat, http_completed_requests_stat, HTTP_INCREMENT_TRANS_STAT, http_response_status_100_count_stat, http_response_status_101_count_stat, http_response_status_1xx_count_stat, http_response_status_200_count_stat, http_response_status_201_count_stat, http_response_status_202_count_stat, http_response_status_203_count_stat, http_response_status_204_count_stat, http_response_status_205_count_stat, http_response_status_206_count_stat, http_response_status_2xx_count_stat, http_response_status_300_count_stat, http_response_status_301_count_stat, http_response_status_302_count_stat, http_response_status_303_count_stat, http_response_status_304_count_stat, http_response_status_305_count_stat, http_response_status_307_count_stat, http_response_status_3xx_count_stat, http_response_status_400_count_stat, http_response_status_401_count_stat, http_response_status_402_count_stat, http_response_status_403_count_stat, http_response_status_404_count_stat, http_response_status_405_count_stat, http_response_status_406_count_stat, http_response_status_407_count_stat, http_response_status_408_count_stat, http_response_status_409_count_stat, http_response_status_410_count_stat, http_response_status_411_count_stat, http_response_status_412_count_stat, http_response_status_413_count_stat, http_response_status_414_count_stat, http_response_status_415_count_stat, http_response_status_416_count_stat, http_response_status_4xx_count_stat, http_response_status_500_count_stat, http_response_status_501_count_stat, http_response_status_502_count_stat, http_response_status_503_count_stat, http_response_status_504_count_stat, http_response_status_505_count_stat, http_response_status_5xx_count_stat, HTTP_SUM_TRANS_STAT, http_ua_msecs_counts_errors_aborts_stat, http_ua_msecs_counts_errors_connect_failed_stat, http_ua_msecs_counts_errors_other_stat, http_ua_msecs_counts_errors_possible_aborts_stat, http_ua_msecs_counts_hit_fresh_process_stat, http_ua_msecs_counts_hit_fresh_stat, http_ua_msecs_counts_hit_reval_stat, http_ua_msecs_counts_miss_changed_stat, http_ua_msecs_counts_miss_client_no_cache_stat, http_ua_msecs_counts_miss_cold_stat, http_ua_msecs_counts_miss_uncacheable_stat, http_ua_msecs_counts_other_unclassified_stat, ink_hrtime_to_msec(), HttpTransact::_SquidLogInfo::log_code, MAYBE_ABORTED, HttpTransact::State::source, SOURCE_INTERNAL, SOURCE_NONE, HttpTransact::State::squid_codes, SQUID_LOG_ERR_CONNECT_FAIL, SQUID_LOG_ERR_READ_TIMEOUT, SQUID_LOG_TCP_CLIENT_REFRESH, SQUID_LOG_TCP_DENIED, SQUID_LOG_TCP_HIT, SQUID_LOG_TCP_IMS_HIT, SQUID_LOG_TCP_IMS_MISS, SQUID_LOG_TCP_MEM_HIT, SQUID_LOG_TCP_MISS, SQUID_LOG_TCP_REF_FAIL_HIT, SQUID_LOG_TCP_REFRESH_HIT, SQUID_LOG_TCP_REFRESH_MISS, SQUID_LOG_TCP_SWAPFAIL, HTTPHdr::status_get(), VIA_CACHE_MISS, VIA_CACHE_RESULT, and VIA_IN_CACHE_NOT_ACCEPTABLE.
Referenced by HttpSM::update_stats().
void HttpTransact::DecideCacheLookup | ( | State * | s | ) | [static] |
Definition at line 1893 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, CACHE_DO_LOOKUP, CACHE_DO_SERVE, HttpTransact::State::cache_info, HttpTransact::State::cache_lookup_result, CallOSDNSLookup(), HttpTransact::_HeaderInfo::client_request, HttpTransact::State::cop_test_page, URL::copy(), URL::create(), HttpTransact::State::current, DebugTxn, HttpTransact::State::force_dns, MIMEHdr::get_host_port_values(), HandlePushError(), HttpTransact::State::hdr_info, URL::host_set(), HTTP_INCREMENT_TRANS_STAT, http_throttled_proxy_only_stat, http_tunnels_stat, HTTP_WKSIDX_PUSH, ink_assert, ink_atoi(), is_request_cache_lookupable(), HttpTransact::_CacheLookupInfo::lookup_url, HttpTransact::_CacheLookupInfo::lookup_url_storage, LookupSkipOpenServer(), OverridableHttpConfigParams::maintain_pristine_host_hdr, HttpTransact::State::method, HttpTransact::_CurrentInfo::mode, URL::port_set(), HttpTransact::_RedirectInfo::redirect_in_process, HttpTransact::State::redirect_info, service_transaction_in_proxy_only_mode(), HTTPHdr::set_url_target_from_host_field(), SM_ACTION_API_CACHE_LOOKUP_COMPLETE, SM_ACTION_CACHE_LOOKUP, TRANSACT_RETURN, TUNNELLING_PROXY, HttpTransact::State::txn_conf, HTTPHdr::url_get(), and URL::valid().
Referenced by HandleFiltering(), and HandleRequestAuthorized().
bool HttpTransact::delete_all_document_alternates_and_return | ( | State * | s, | |
bool | cache_hit | |||
) | [static] |
Definition at line 6962 of file HttpTransact.cc.
References build_response(), HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, DebugTxn, MIMEHdr::field_find(), HttpTransact::State::hdr_info, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK, HttpTransact::ConnectionAttributes::http_version, HTTP_WKSIDX_DELETE, HTTP_WKSIDX_GET, HTTP_WKSIDX_PURGE, HttpTransact::_CacheLookupInfo::is_ram_cache_hit, HttpTransact::State::method, MIME_FIELD_MAX_FORWARDS, MIME_LEN_MAX_FORWARDS, SET_VIA_STRING, HttpTransact::_HeaderInfo::trust_response_cl, MIMEField::value_get_int(), MIMEHdr::value_set_int(), VIA_CACHE_RESULT, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_MISS_NOT_CACHED, VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_NO_FORWARD, VIA_IN_CACHE_FRESH, and VIA_IN_RAM_CACHE_FRESH.
Referenced by HandleCacheOpenReadHitFreshness(), and HandleCacheOpenReadMiss().
void HttpTransact::delete_server_rr_entry | ( | State * | s, | |
int | max_retries | |||
) | [static] |
Definition at line 3708 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, HttpTransact::State::arena, ats_ip_ntop(), HttpTransact::_CurrentInfo::attempts, HttpTransact::State::current, DebugTxn, HttpTransact::State::dns_info, HttpTransact::ConnectionAttributes::had_connect_fail(), ink_assert, ORIGIN_SERVER, ReDNSRoundRobin(), HttpTransact::_CurrentInfo::request_to, IpEndpoint::sa, HttpTransact::_CurrentInfo::server, HttpTransact::State::server_info, SM_ACTION_ORIGIN_SERVER_RR_MARK_DOWN, TRANSACT_RETURN, and update_dns_info().
Referenced by handle_response_from_server().
void HttpTransact::delete_warning_value | ( | HTTPHdr * | to_warn, | |
HTTPWarningCode | warning_code | |||
) | [static] |
Definition at line 8738 of file HttpTransact.cc.
References MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_delete(), MIMEHdr::field_find(), MIMEHdr::field_value_set(), HdrCsvIter::get_current(), HdrCsvIter::get_first_int(), HdrCsvIter::get_next_int(), HdrHeapSDKHandle::m_heap, MIMEHdr::m_mime, MIME_FIELD_WARNING, MIME_LEN_WARNING, MIMEField::name_set(), and MIMEField::value_append().
Referenced by build_response_from_cache(), handle_cache_operation_on_forward_server_response(), and merge_and_update_headers_for_cache_update().
bool HttpTransact::did_forward_server_send_0_9_response | ( | State * | s | ) | [static] |
Definition at line 5326 of file HttpTransact.cc.
References HttpTransact::State::current, HttpTransact::State::hdr_info, HttpTransact::ConnectionAttributes::http_version, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_response, HTTPVersion::set(), and HTTPHdr::version_get().
Referenced by check_response_validity().
bool HttpTransact::does_client_request_permit_cached_response | ( | const OverridableHttpConfigParams * | p, | |
CacheControlResult * | c, | |||
HTTPHdr * | h, | |||
char * | via_string | |||
) | [static] |
Definition at line 7014 of file HttpTransact.cc.
References OverridableHttpConfigParams::cache_ims_on_client_no_cache, HTTP_VALUE_NO_CACHE, CacheControlResult::ignore_client_no_cache, HTTPHdr::is_cache_control_set(), and HTTPHdr::is_pragma_no_cache_set().
Referenced by update_cache_control_information_from_config().
bool HttpTransact::does_client_request_permit_dns_caching | ( | CacheControlResult * | c, | |
HTTPHdr * | h | |||
) | [static] |
Definition at line 7038 of file HttpTransact.cc.
References HTTP_VALUE_NO_CACHE, CacheControlResult::ignore_client_no_cache, HTTPHdr::is_cache_control_set(), and HTTPHdr::is_pragma_no_cache_set().
Referenced by update_cache_control_information_from_config().
bool HttpTransact::does_client_request_permit_storing | ( | CacheControlResult * | c, | |
HTTPHdr * | h | |||
) | [static] |
Definition at line 7047 of file HttpTransact.cc.
References HTTP_VALUE_NO_STORE, CacheControlResult::ignore_client_no_cache, and HTTPHdr::is_cache_control_set().
Referenced by update_cache_control_information_from_config().
void HttpTransact::EndRemapRequest | ( | State * | s | ) | [static] |
It's better to test redirect rules just after url_remap failed Or those successfully remapped rules might be redirected
Definition at line 836 of file HttpTransact.cc.
References ats_free(), build_error_response(), HTTPHdr::clear(), HttpTransact::State::client_connection_enabled, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::cop_test_page, DebugTxn, HttpClientSession::f_outbound_transparent, handleIfRedirect(), HandleRequest(), HttpTransact::State::hdr_info, HTTPHdr::host_get(), HttpTransact::State::http_config_param, HTTP_INCREMENT_TRANS_STAT, http_invalid_client_requests_stat, HTTP_NO_PLUGIN_TUNNEL, HttpTransact::State::http_return_code, HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_MOVED_TEMPORARILY, HTTP_STATUS_NONE, HTTP_STATUS_NOT_FOUND, initialize_state_variables_from_request(), ink_assert, HttpTransact::State::internal_msg_buffer, HttpTransact::State::internal_msg_buffer_size, is_debug_tag_set, HTTPHdr::is_target_in_url(), HttpTransact::ConnectionAttributes::is_transparent, HttpTransact::State::is_upgrade_request, HTTPHdr::m_http, HTTPHdr::method_get_wksidx(), MIME_FIELD_LOCATION, MIME_LEN_LOCATION, obj_describe(), HttpSM::plugin_tunnel_type, HttpTransact::State::post_remap_upgrade_return_point, process_quick_http_filter(), HttpTransact::State::remap_redirect, HttpTransact::State::req_flavor, HttpTransact::State::reverse_proxy, HttpConfigParams::reverse_proxy_enabled, HttpConfigParams::reverse_proxy_no_host_redirect, HttpConfigParams::reverse_proxy_no_host_redirect_len, HttpTransact::State::server_info, SET_VIA_STRING, SM_ACTION_API_POST_REMAP, SM_ACTION_INTERNAL_CACHE_NOOP, SM_ACTION_SEND_ERROR_CACHE_NOOP, HttpTransact::State::state_machine, TRANSACT_RETURN, HttpSM::ua_session, HttpConfigParams::url_remap_required, HttpTransact::State::url_remap_success, MIMEHdr::value_set(), VIA_DETAIL_TUNNEL, and VIA_DETAIL_TUNNEL_NO_FORWARD.
Referenced by PerformRemap().
const char * HttpTransact::get_error_string | ( | int | erno | ) | [static] |
Definition at line 8212 of file HttpTransact.cc.
References ENET_THROTTLING, ESOCK_DENIED, ESOCK_NO_SOCK_SERVER_CONN, ESOCK_TIMEOUT, and UNKNOWN_INTERNAL_ERROR.
Referenced by build_error_response(), and handle_server_died().
void HttpTransact::get_ka_info_from_host_db | ( | State * | s, | |
ConnectionAttributes * | server_info, | |||
ConnectionAttributes * | client_info, | |||
HostDBInfo * | host_db_info | |||
) | [static] |
Definition at line 5012 of file HttpTransact.cc.
References HostDBInfo::app, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::hdr_info, HostDBApplicationInfo::http_data, HttpTransact::ConnectionAttributes::http_version, HostDBApplicationInfo::http_server_attr::http_version, HostDBApplicationInfo::HTTP_VERSION_09, HostDBApplicationInfo::HTTP_VERSION_10, HostDBApplicationInfo::HTTP_VERSION_11, ink_assert, HttpTransact::ConnectionAttributes::keep_alive, OverridableHttpConfigParams::keep_alive_enabled_out, HttpConfigParams::SEND_HTTP11_ALWAYS, HttpConfigParams::SEND_HTTP11_IF_REQUEST_11_AND_HOSTDB, HttpConfigParams::SEND_HTTP11_NEVER, OverridableHttpConfigParams::send_http11_requests, HttpConfigParams::SEND_HTTP11_UPGRADE_HOSTDB, HTTPVersion::set(), HttpTransact::State::txn_conf, and HTTPHdr::version_get().
Referenced by OSDNSLookup(), PPDNSLookup(), and ReDNSRoundRobin().
void HttpTransact::handle_100_continue_response | ( | State * | s | ) | [static] |
Definition at line 3991 of file HttpTransact.cc.
References build_response_copy(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, HandleResponse(), HttpTransact::State::hdr_info, HttpTransact::ConnectionAttributes::http_version, MIME_FIELD_EXPECT, MIME_LEN_EXPECT, HttpTransact::_HeaderInfo::server_response, SM_ACTION_INTERNAL_100_RESPONSE, SM_ACTION_SERVER_PARSE_NEXT_HDR, TRANSACT_RETURN, MIMEHdr::value_get_int(), and HTTPHdr::version_get().
Referenced by handle_forward_server_connection_open().
void HttpTransact::handle_cache_operation_on_forward_server_response | ( | State * | s | ) | [static] |
Definition at line 4074 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::already_downgraded, HttpTransact::State::api_server_response_ignore, HttpTransact::State::api_server_response_no_store, build_error_response(), build_response(), CACHE_AUTH_FRESH, CACHE_AUTH_STALE, CACHE_DO_DELETE, CACHE_DO_NO_ACTION, CACHE_DO_REPLACE, CACHE_DO_SERVE_AND_DELETE, CACHE_DO_SERVE_AND_UPDATE, CACHE_DO_UPDATE, CACHE_DO_WRITE, HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_when_to_revalidate, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::cop_test_page, HTTPInfo::create(), HttpTransact::State::current, DebugTxn, delete_warning_value(), HttpSM::do_range_setup_if_necessary(), HttpSM::do_transform_open(), HttpTransactHeaders::downgrade_request(), DUMP_HEADER, MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_find(), MIMEHdr::field_value_append(), HttpDebugNames::get_cache_action_name(), GET_VIA_STRING, HttpTransact::State::hdr_info, how_to_open_connection(), http_cache_deletes_stat, http_cache_updates_stat, http_cache_writes_stat, HttpTransact::State::http_config_param, HTTP_INCREMENT_TRANS_STAT, HTTP_STATUS_BAD_GATEWAY, HTTP_STATUS_GATEWAY_TIMEOUT, HTTP_STATUS_HTTPVER_NOT_SUPPORTED, HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_NONE, HTTP_STATUS_NOT_MODIFIED, HTTP_STATUS_OK, HTTP_STATUS_PRECONDITION_FAILED, HTTP_STATUS_SERVICE_UNAVAILABLE, HTTP_STATUS_UNAUTHORIZED, HttpTransact::ConnectionAttributes::http_version, HTTP_WARNING_CODE_MISC_WARNING, HTTP_WARNING_CODE_REVALIDATION_FAILED, HTTP_WKSIDX_HEAD, ink_assert, ink_cluster_time(), HttpTransactHeaders::insert_warning_header(), is_negative_caching_appropriate(), is_request_conditional(), is_request_likely_cacheable(), is_response_cacheable(), is_stale_cache_response_returnable(), HttpTransact::ConnectionAttributes::keep_alive, MIMEField::m_next_dup, HttpTransactCache::match_response_to_request_conditionals(), merge_and_update_headers_for_cache_update(), HttpTransact::State::method, HTTPHdr::method_get_wksidx(), MIME_FIELD_PROXY_CONNECTION, MIME_FIELD_VIA, MIME_LEN_PROXY_CONNECTION, MIME_LEN_VIA, MIME_PRESENCE_EXPIRES, MIME_PRESENCE_RANGE, HttpTransact::State::negative_caching, OverridableHttpConfigParams::negative_caching_lifetime, OverridableHttpConfigParams::negative_revalidating_enabled, OverridableHttpConfigParams::negative_revalidating_lifetime, HttpTransact::State::next_action, HttpTransact::_CacheLookupInfo::object_read, HttpTransact::_CacheLookupInfo::object_store, MIMEHdr::presence(), HTTPInfo::request_set(), HTTPInfo::response_get(), HTTPInfo::response_set(), HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, HttpTransact::_HeaderInfo::server_response, MIMEHdr::set_expires(), set_header_for_transform(), set_headers_for_cache_write(), SET_VIA_STRING, SM_ACTION_SERVE_FROM_CACHE, SM_ACTION_SERVER_READ, HttpTransact::State::state_machine, HttpTransact::State::state_machine_id, HTTPHdr::status_get(), HttpTransact::State::txn_conf, MIMEHdr::unset_cooked_cc_need_revalidate_once(), HTTPHdr::valid(), MIMEField::value_get(), VIA_CACHE_DELETED, VIA_CACHE_FILL_ACTION, VIA_CACHE_UPDATED, VIA_CACHE_WRITTEN, VIA_CLIENT_IMS, VIA_CLIENT_REQUEST, VIA_CLIENT_SIMPLE, VIA_PROXY_NOT_MODIFIED, VIA_PROXY_RESULT, VIA_PROXY_SERVED, VIA_PROXY_SERVER_REVALIDATED, VIA_SERVER_NOT_MODIFIED, VIA_SERVER_RESULT, VIA_SERVER_SERVED, and HttpTransact::State::www_auth_content.
Referenced by handle_forward_server_connection_open().
void HttpTransact::handle_cache_write_lock | ( | State * | s | ) | [static] |
Definition at line 2925 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::cache_info, CACHE_PREPARE_TO_DELETE, CACHE_PREPARE_TO_UPDATE, CACHE_PREPARE_TO_WRITE, CACHE_WL_FAIL, CACHE_WL_INIT, CACHE_WL_READ_RETRY, CACHE_WL_SUCCESS, HttpTransact::_HeaderInfo::client_request, HdrHeapSDKHandle::destroy(), MIMEHdr::field_delete(), MIMEHdr::field_find(), HandleCacheOpenReadHitFreshness(), HttpTransact::State::hdr_info, how_to_open_connection(), ink_assert, ink_release_assert, MIME_FIELD_IF_MODIFIED_SINCE, MIME_FIELD_IF_NONE_MATCH, MIME_LEN_IF_MODIFIED_SINCE, MIME_LEN_IF_NONE_MATCH, HttpTransact::State::next_action, HttpTransact::State::request_sent_time, HttpTransact::State::response_received_time, HttpTransact::_HeaderInfo::server_request, SET_UNPREPARE_CACHE_ACTION, SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, SM_ACTION_ORIGIN_SERVER_OPEN, SM_ACTION_ORIGIN_SERVER_RAW_OPEN, HttpTransact::State::stale_icp_lookup, TRANSACT_RETURN, MIMEField::value_get(), MIMEHdr::value_set(), VIA_DETAIL_CACHE, VIA_DETAIL_CACHE_TYPE, HttpTransact::_CacheLookupInfo::write_lock_state, and HttpTransact::_CacheLookupInfo::write_status.
void HttpTransact::handle_content_length_header | ( | State * | s, | |
HTTPHdr * | header, | |||
HTTPHdr * | base | |||
) | [static] |
Definition at line 6604 of file HttpTransact.cc.
References HttpTransact::State::cache_info, change_response_header_because_of_range_request(), cl, Debug, DebugTxn, MIMEHdr::field_delete(), MIMEHdr::get_content_length(), HttpTransact::State::hdr_info, HTTP_UNDEFINED_CL, ink_assert, ink_release_assert, INT64_MAX, is_response_body_precluded(), HttpTransact::State::method, MIME_FIELD_CONTENT_LENGTH, MIME_LEN_CONTENT_LENGTH, MIME_PRESENCE_CONTENT_LENGTH, HttpTransact::_CacheLookupInfo::object_read, HTTPInfo::object_size_get(), MIMEHdr::presence(), RANGE_NONE, RANGE_NOT_TRANSFORM_REQUESTED, HttpTransact::State::range_output_cl, RANGE_REQUESTED, HttpTransact::State::range_setup, HttpTransact::_HeaderInfo::request_content_length, MIMEHdr::set_content_length(), HttpTransact::State::source, SOURCE_CACHE, SOURCE_HTTP_ORIGIN_SERVER, SOURCE_TRANSFORM, HTTPHdr::status_get(), HttpTransact::_HeaderInfo::transform_response_cl, HttpTransact::_HeaderInfo::trust_response_cl, and HTTPHdr::type_get().
Referenced by build_response().
void HttpTransact::handle_forward_server_connection_open | ( | State * | s | ) | [static] |
Definition at line 3869 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::api_server_response_ignore, build_response(), CACHE_AUTH_FRESH, CACHE_DO_DELETE, CACHE_DO_LOOKUP, CACHE_DO_NO_ACTION, CACHE_DO_SERVE, CACHE_DO_UNDEFINED, CACHE_DO_UPDATE, CACHE_DO_WRITE, HttpTransact::State::cache_info, CACHE_PREPARE_TO_DELETE, CACHE_PREPARE_TO_UPDATE, CACHE_PREPARE_TO_WRITE, HttpCacheSM::cache_write_vc, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, CONNECTION_ALIVE, HttpTransact::State::current, DebugTxn, HttpSM::do_hostdb_update_if_necessary(), HttpSM::enable_redirection, HttpDebugNames::get_cache_action_name(), HttpSM::get_cache_sm(), handle_100_continue_response(), handle_cache_operation_on_forward_server_response(), handle_no_cache_operation_on_forward_server_response(), HttpTransact::State::hdr_info, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_MOVED_TEMPORARILY, HTTP_STATUS_MULTIPLE_CHOICES, HTTP_STATUS_OK, HTTP_STATUS_SEE_OTHER, HTTP_STATUS_TEMPORARY_REDIRECT, HTTP_STATUS_USE_PROXY, HttpTransact::ConnectionAttributes::http_version, ink_assert, ink_release_assert, HttpTransact::ConnectionAttributes::keep_alive, HttpTransact::State::next_action, HttpTransact::_RedirectInfo::redirect_in_process, HttpTransact::State::redirect_info, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_response, HttpTransact::_CurrentInfo::state, HttpTransact::State::state_machine, HTTPHdr::status_get(), HttpTransact::State::updated_server_version, HTTPHdr::version_get(), and HttpTransact::State::www_auth_content.
Referenced by handle_response_from_icp_suggested_host(), handle_response_from_parent(), and handle_response_from_server().
Definition at line 5336 of file HttpTransact.cc.
References HTTP_WKSIDX_GET, ink_assert, StatPagesManager::is_stat_page(), HTTPHdr::method_get_wksidx(), URL::scheme_get_wksidx(), statPagesManager, HTTPHdr::type_get(), HTTPHdr::url_get(), URL_WKSIDX_HTTP, and URL_WKSIDX_HTTPS.
Referenced by HandleRequest().
void HttpTransact::handle_no_cache_operation_on_forward_server_response | ( | State * | s | ) | [static] |
Definition at line 4531 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::already_downgraded, build_error_response(), build_response(), CACHE_DO_NO_ACTION, HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::current, DebugTxn, HttpSM::do_transform_open(), HttpTransactHeaders::downgrade_request(), HttpSM::enable_redirection, HttpTransact::State::hdr_info, how_to_open_connection(), HttpTransact::State::http_config_param, HTTP_STATUS_HTTPVER_NOT_SUPPORTED, HTTP_STATUS_NOT_MODIFIED, HTTP_STATUS_OK, HTTP_STATUS_PARTIAL_CONTENT, HttpTransact::ConnectionAttributes::http_version, HTTP_WARNING_CODE_MISC_WARNING, HTTP_WKSIDX_CONNECT, ink_assert, HttpTransactHeaders::insert_warning_header(), is_request_conditional(), HttpTransact::ConnectionAttributes::keep_alive, HttpTransact::State::method, HttpTransact::State::next_action, HttpSM::redirect_url, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, HttpTransact::_HeaderInfo::server_response, set_header_for_transform(), SET_VIA_STRING, SM_ACTION_SERVER_READ, HttpTransact::State::state_machine, HTTPHdr::status_get(), HttpTransact::_HeaderInfo::transform_response, VIA_PROXY_NOT_MODIFIED, VIA_PROXY_RESULT, VIA_PROXY_SERVED, VIA_SERVER_NOT_MODIFIED, VIA_SERVER_RESULT, and VIA_SERVER_SERVED.
Referenced by handle_forward_server_connection_open().
void HttpTransact::handle_parent_died | ( | State * | s | ) | [static] |
Definition at line 7479 of file HttpTransact.cc.
References build_error_response(), HTTP_STATUS_BAD_GATEWAY, ink_assert, PARENT_FAIL, HttpTransact::State::parent_result, ParentResult::r, SM_ACTION_SEND_ERROR_CACHE_NOOP, and TRANSACT_RETURN.
Referenced by handle_response_from_parent(), HandleCacheOpenReadHit(), HandleCacheOpenReadMiss(), and PPDNSLookup().
void HttpTransact::handle_request_keep_alive_headers | ( | State * | s, | |
HTTPVersion | ver, | |||
HTTPHdr * | heads | |||
) | [static] |
Definition at line 6719 of file HttpTransact.cc.
References HttpTransact::State::client_info, HttpTransact::State::current, MIMEHdr::field_delete(), MIMEHdr::get_content_length(), HTTP_MAJOR, HTTP_NO_KEEPALIVE, HTTP_WKSIDX_DELETE, HTTP_WKSIDX_GET, HTTP_WKSIDX_HEAD, HTTP_WKSIDX_OPTIONS, HTTP_WKSIDX_PURGE, HTTP_WKSIDX_TRACE, ICP_SUGGESTED_HOST, ink_assert, HttpTransact::State::is_upgrade_request, HttpTransact::State::is_websocket, HttpTransact::ConnectionAttributes::keep_alive, HTTPVersion::m_version, HTTPHdr::method_get_wksidx(), MIME_FIELD_CONNECTION, MIME_FIELD_PROXY_CONNECTION, MIME_FIELD_UPGRADE, MIME_LEN_CONNECTION, MIME_LEN_PROXY_CONNECTION, MIME_LEN_UPGRADE, PARENT_PROXY, HttpTransact::_CurrentInfo::request_to, HttpTransact::_CurrentInfo::server, HTTPHdr::type_get(), and MIMEHdr::value_set().
Referenced by build_request().
void HttpTransact::handle_response_from_icp_suggested_host | ( | State * | s | ) | [static] |
Definition at line 3416 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, ats_is_ip(), CONNECTION_ALIVE, HttpTransact::State::current, DebugTxn, find_server_and_update_current_info(), handle_forward_server_connection_open(), handle_server_died(), HttpTransact::State::hdr_info, how_to_open_connection(), HTTP_RELEASE_ASSERT, HttpTransact::State::icp_info, ink_assert, ink_release_assert, is_request_retryable(), HttpTransact::State::next_action, HttpTransact::State::next_hop_scheme, PARENT_PROXY, PPDNSLookup(), HttpTransactHeaders::remove_host_name_from_url(), HttpTransact::_CurrentInfo::request_to, HttpTransact::_CurrentInfo::server, HttpTransact::State::server_info, HttpTransact::_HeaderInfo::server_request, SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, HttpTransact::_CurrentInfo::state, HttpTransact::ConnectionAttributes::state, TRANSACT_RETURN, URL_WKSIDX_HTTP, VIA_DETAIL_ICP_CONNECT, VIA_DETAIL_ICP_FAILURE, and VIA_DETAIL_ICP_SUCCESS.
Referenced by HandleResponse().
void HttpTransact::handle_response_from_parent | ( | State * | s | ) | [static] |
Definition at line 3477 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, ats_ip_ntop(), HttpTransact::_CurrentInfo::attempts, HttpTransact::ConnectionAttributes::connect_result, CONNECTION_ALIVE, CONNECTION_ERROR, HttpTransact::State::current, DebugTxn, find_server_and_update_current_info(), handle_forward_server_connection_open(), handle_parent_died(), HttpTransact::State::hdr_info, HOST_NONE, how_to_open_connection(), HttpTransact::State::http_config_param, HTTP_RELEASE_ASSERT, ink_assert, is_request_retryable(), ParentConfigParams::markParentDown(), HttpTransact::State::next_action, HttpTransact::State::next_hop_scheme, ORIGIN_SERVER, HttpConfigParams::parent_connect_attempts, HttpTransact::State::parent_info, HttpTransact::State::parent_params, PARENT_PROXY, HttpTransact::State::parent_result, HttpConfigParams::per_parent_connect_attempts, PPDNSLookup(), ParentResult::r, ParentConfigParams::recordRetrySuccess(), HttpTransactHeaders::remove_host_name_from_url(), HttpTransact::_CurrentInfo::request_to, ParentResult::retry, IpEndpoint::sa, HttpTransact::_CurrentInfo::server, HttpTransact::State::server_info, HttpTransact::_HeaderInfo::server_request, SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, HttpTransact::_CurrentInfo::state, HttpTransact::ConnectionAttributes::state, TRANSACT_RETURN, URL_WKSIDX_HTTP, HTTPHdr::valid(), VIA_DETAIL_PP_CONNECT, VIA_DETAIL_PP_FAILURE, and VIA_DETAIL_PP_SUCCESS.
Referenced by HandleResponse().
void HttpTransact::handle_response_from_server | ( | State * | s | ) | [static] |
Definition at line 3595 of file HttpTransact.cc.
References ACTIVE_TIMEOUT, HttpTransact::ConnectionAttributes::addr, ats_host_res_match(), HttpTransact::_CurrentInfo::attempts, BAD_INCOMING_RESPONSE, HttpTransact::ConnectionAttributes::clear_connect_fail(), CONGEST_CONTROL_CONGESTED_ON_F, CONGEST_CONTROL_CONGESTED_ON_M, OverridableHttpConfigParams::connect_attempts_max_retries, OverridableHttpConfigParams::connect_attempts_max_retries_dead_server, OverridableHttpConfigParams::connect_attempts_rr_retries, CongestionEntry::connect_retries(), CONNECTION_ALIVE, CONNECTION_CLOSED, CONNECTION_ERROR, HttpTransact::State::current, DebugTxn, delete_server_rr_entry(), HttpTransact::State::dns_info, HttpTransact::ConnectionAttributes::dns_round_robin, HttpTransact::State::fp_tsremap_os_response, HttpTransact::ConnectionAttributes::had_connect_fail(), handle_forward_server_connection_open(), handle_server_connection_not_open(), HttpClientSession::host_res_style, how_to_open_connection(), HTTP_RELEASE_ASSERT, INACTIVE_TIMEOUT, ink_assert, is_request_retryable(), is_server_negative_cached(), HttpTransact::_DNSLookupInfo::lookup_success, HttpTransact::State::next_action, OPEN_RAW_ERROR, HttpTransact::_DNSLookupInfo::os_addr_style, HttpTransact::_DNSLookupInfo::OS_ADDR_TRY_CLIENT, OSDNSLookup(), PARSE_ERROR, HttpTransact::State::pCongestionEntry, HttpTransact::State::remap_plugin_instance, retry_server_connection_not_open(), IpEndpoint::sa, HttpTransact::_CurrentInfo::server, HttpTransact::State::server_info, HttpTransact::ConnectionAttributes::set_connect_fail(), SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, HttpTransact::_DNSLookupInfo::srv_lookup_success, HttpTransact::_CurrentInfo::state, HttpTransact::ConnectionAttributes::state, HttpTransact::State::state_machine, STATE_UNDEFINED, TRANSACT_RETURN, HttpTransact::State::txn_conf, HttpSM::ua_session, VIA_DETAIL_SERVER_CONNECT, VIA_DETAIL_SERVER_FAILURE, and VIA_DETAIL_SERVER_SUCCESS.
Referenced by HandleResponse().
void HttpTransact::handle_response_keep_alive_headers | ( | State * | s, | |
HTTPVersion | ver, | |||
HTTPHdr * | heads | |||
) | [static] |
Definition at line 6827 of file HttpTransact.cc.
References CHUNKED_ENCODING, OverridableHttpConfigParams::chunking_enabled, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::current, DebugTxn, HttpTransact::State::did_upgrade_succeed, MIMEHdr::field_delete(), MIMEHdr::get_content_length(), HttpTransact::State::hdr_info, HTTP_KEEPALIVE, HTTP_LEN_CHUNKED, HTTP_MAJOR, HTTP_NO_KEEPALIVE, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_NOT_MODIFIED, HTTP_STATUS_SWITCHING_PROTOCOL, HTTP_VALUE_CHUNKED, HttpTransact::ConnectionAttributes::http_version, HTTP_WKSIDX_PUSH, ink_assert, is_response_body_precluded(), HttpTransact::State::is_upgrade_request, HttpTransact::State::is_websocket, HttpTransact::ConnectionAttributes::keep_alive, HTTPVersion::m_version, HttpTransact::State::method, MIME_FIELD_CONNECTION, MIME_FIELD_CONTENT_LENGTH, MIME_FIELD_PROXY_CONNECTION, MIME_FIELD_TRANSFER_ENCODING, MIME_FIELD_UPGRADE, MIME_LEN_CONNECTION, MIME_LEN_CONTENT_LENGTH, MIME_LEN_PROXY_CONNECTION, MIME_LEN_TRANSFER_ENCODING, MIME_LEN_UPGRADE, HttpTransact::ConnectionAttributes::proxy_connect_hdr, HttpTransact::ConnectionAttributes::receive_chunked_response, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_response, HttpTransact::State::source, SOURCE_CACHE, SOURCE_HTTP_ORIGIN_SERVER, SOURCE_TRANSFORM, HTTPHdr::status_get(), HttpTransact::ConnectionAttributes::transfer_encoding, HttpTransact::_HeaderInfo::trust_response_cl, HttpTransact::State::txn_conf, HTTPHdr::type_get(), HTTPHdr::valid(), MIMEHdr::value_append(), and MIMEHdr::value_set().
Referenced by build_response().
void HttpTransact::handle_server_connection_not_open | ( | State * | s | ) | [static] |
Definition at line 3786 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, build_response_from_cache(), CACHE_DO_DELETE, CACHE_DO_LOOKUP, CACHE_DO_NO_ACTION, CACHE_DO_SERVE, CACHE_DO_UNDEFINED, CACHE_DO_UPDATE, CACHE_DO_WRITE, HttpTransact::State::cache_info, CACHE_PREPARE_TO_DELETE, CACHE_PREPARE_TO_UPDATE, CACHE_PREPARE_TO_WRITE, CONNECTION_ALIVE, HttpTransact::State::current, DebugTxn, HttpSM::do_hostdb_update_if_necessary(), HttpTransact::ConnectionAttributes::had_connect_fail(), handle_server_died(), http_broken_server_connections_stat, HTTP_INCREMENT_TRANS_STAT, HTTP_WARNING_CODE_REVALIDATION_FAILED, ink_assert, ink_release_assert, HttpTransact::State::internal_msg_buffer, is_stale_cache_response_returnable(), HttpTransact::State::next_action, HttpTransact::_CacheLookupInfo::object_read, HttpTransact::_CurrentInfo::server, SET_VIA_STRING, HttpTransact::_CurrentInfo::state, HttpTransact::State::state_machine, VIA_SERVER_ERROR, and VIA_SERVER_RESULT.
Referenced by handle_response_from_server().
void HttpTransact::handle_server_died | ( | State * | s | ) | [static] |
Definition at line 7488 of file HttpTransact.cc.
References ACTIVE_TIMEOUT, HttpTransact::State::api_txn_active_timeout_value, HttpTransact::State::api_txn_connect_timeout_value, BAD_INCOMING_RESPONSE, BOGUS_OR_NO_DATE_IN_RESPONSE, build_error_response(), HttpTransact::State::cause_of_death_errno, CONGEST_CONTROL_CONGESTED_ON_F, CONGEST_CONTROL_CONGESTED_ON_M, CONGEST_SUM_GLOBAL_DYN_STAT, congested_on_F_stat, HttpTransact::State::congestion_congested_or_failed, CONNECTION_ALIVE, CONNECTION_CLOSED, CONNECTION_ERROR, HttpTransact::State::current, DebugTxn, CongestionEntry::F_congested(), CongestionEntry::failed_at(), get_error_string(), CongestionEntry::getErrorPage(), HttpTransact::State::hdr_info, INACTIVE_TIMEOUT, ink_release_assert, MISSING_REASON_PHRASE, MISSING_STATUS_CODE, NO_RESPONSE_HEADER_ERROR, NON_EXISTANT_RESPONSE_HEADER, NOT_A_RESPONSE_HEADER, HttpTransact::_CurrentInfo::now, OPEN_RAW_ERROR, PARSE_ERROR, HttpTransact::State::pCongestionEntry, HttpTransact::_HeaderInfo::response_error, CongestionEntry::stat_inc_F(), HttpTransact::_CurrentInfo::state, STATE_UNDEFINED, and TRANSACTION_COMPLETE.
Referenced by handle_response_from_icp_suggested_host(), handle_server_connection_not_open(), and OriginServerRawOpen().
Definition at line 5361 of file HttpTransact.cc.
References Allocator::alloc_void(), ats_malloc(), buffer_size_to_index(), build_response(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::current, DebugTxn, Log::error(), HttpTransact::State::free_internal_msg_buffer(), MIMEHdr::get_max_forwards(), HttpTransact::State::hdr_info, HTTP_INCREMENT_TRANS_STAT, HTTP_RELEASE_ASSERT, HTTP_STATUS_OK, http_tunnels_stat, HttpTransact::ConnectionAttributes::http_version, HTTP_WKSIDX_OPTIONS, HTTP_WKSIDX_TRACE, ink_assert, HttpTransactHeaders::insert_supported_methods_in_response(), HttpTransact::State::internal_msg_buffer, HttpTransact::State::internal_msg_buffer_fast_allocator_size, HttpTransact::State::internal_msg_buffer_index, HttpTransact::State::internal_msg_buffer_size, ioBufAllocator, HTTPHdr::length_get(), max_iobuffer_size, HttpTransact::State::method, MIME_PRESENCE_MAX_FORWARDS, HttpTransact::_CurrentInfo::mode, MIMEHdr::presence(), HTTPHdr::print(), HttpTransact::State::scheme, MIMEHdr::set_content_length(), MIMEHdr::set_max_forwards(), SET_VIA_STRING, HTTPHdr::type_get(), VIA_DETAIL_TUNNEL, and VIA_DETAIL_TUNNEL_NO_FORWARD.
Referenced by HandleRequest().
void HttpTransact::handle_transform_cache_write | ( | State * | s | ) | [static] |
Definition at line 4687 of file HttpTransact.cc.
References HttpTransact::State::cache_info, CACHE_PREPARE_TO_WRITE, CACHE_WL_FAIL, CACHE_WL_SUCCESS, ink_assert, ink_release_assert, SM_ACTION_TRANSFORM_READ, TRANSACT_RETURN, HttpTransact::_CacheLookupInfo::transform_action, HttpTransact::_CacheLookupInfo::transform_write_status, and HttpTransact::_CacheLookupInfo::write_lock_state.
Referenced by handle_transform_ready().
void HttpTransact::handle_transform_ready | ( | State * | s | ) | [static] |
Definition at line 4709 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::api_info, build_response(), CACHE_DO_DELETE, CACHE_DO_NO_ACTION, HttpTransact::State::cache_info, _HttpApiInfo::cache_transformed, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::cop_test_page, DUMP_HEADER, handle_transform_cache_write(), HttpTransact::State::hdr_info, HttpTransact::ConnectionAttributes::http_version, ink_assert, ink_release_assert, is_action_tag_set, HttpTransact::State::pre_transform_source, HttpTransact::State::range_setup, HTTPInfo::request_get(), HTTPInfo::response_get(), HttpTransact::_HeaderInfo::server_request, set_headers_for_cache_write(), SM_ACTION_CACHE_ISSUE_WRITE_TRANSFORM, SM_ACTION_TRANSFORM_READ, HttpTransact::State::source, SOURCE_CACHE, SOURCE_HTTP_ORIGIN_SERVER, HttpTransact::State::state_machine_id, TRANSACT_RETURN, HttpTransact::_CacheLookupInfo::transform_action, HttpTransact::_HeaderInfo::transform_response, HttpTransact::_CacheLookupInfo::transform_store, and HTTPHdr::valid().
Referenced by HttpSM::state_response_wait_for_transform_read().
bool HttpTransact::handle_upgrade_request | ( | State * | s | ) | [static] |
Definition at line 984 of file HttpTransact.cc.
References build_error_response(), HttpTransact::_HeaderInfo::client_request, StrList::count, DebugTxn, MIMEHdr::field_find(), StrList::get_idx(), handle_websocket_upgrade_pre_remap(), HttpTransact::State::hdr_info, hdrtoken_tokenize(), HTTP_STATUS_BAD_REQUEST, HTTP_WKSIDX_GET, HttpTransact::State::is_upgrade_request, Str::len, HttpTransact::State::method, MIME_FIELD_CONNECTION, MIME_FIELD_SEC_WEBSOCKET_KEY, MIME_FIELD_SEC_WEBSOCKET_VERSION, MIME_FIELD_UPGRADE, MIME_LEN_CONNECTION, MIME_LEN_SEC_WEBSOCKET_KEY, MIME_LEN_SEC_WEBSOCKET_VERSION, MIME_LEN_UPGRADE, MIME_PRESENCE_CONNECTION, MIME_PRESENCE_UPGRADE, MIME_VALUE_WEBSOCKET, MIMEHdr::presence(), ptr_len_casecmp(), SM_ACTION_SEND_ERROR_CACHE_NOOP, Str::str, TRANSACT_RETURN_VAL, HttpTransact::State::upgrade_token_wks, val, MIMEField::value_get(), MIMEField::value_get_comma_list(), MIMEField::value_get_int(), and HTTPHdr::version_get().
Referenced by ModifyRequest().
void HttpTransact::handle_websocket_connection | ( | State * | s | ) | [static] |
Definition at line 1108 of file HttpTransact.cc.
References DebugTxn, and HandleRequest().
Referenced by handle_websocket_upgrade_post_remap().
void HttpTransact::handle_websocket_upgrade_post_remap | ( | State * | s | ) | [static] |
Definition at line 1101 of file HttpTransact.cc.
References DebugTxn, handle_websocket_connection(), SM_ACTION_API_POST_REMAP, and TRANSACT_RETURN.
void HttpTransact::handle_websocket_upgrade_pre_remap | ( | State * | s | ) | [static] |
Definition at line 1073 of file HttpTransact.cc.
References build_error_response(), HttpTransact::_HeaderInfo::client_request, DebugTxn, HttpTransact::State::hdr_info, HTTP_STATUS_BAD_REQUEST, HttpTransact::State::is_websocket, HttpTransact::State::post_remap_upgrade_return_point, URL::scheme_get_wksidx(), URL::scheme_set(), SM_ACTION_API_READ_REQUEST_HDR, SM_ACTION_SEND_ERROR_CACHE_NOOP, StartRemapRequest(), TRANSACT_RETURN, HTTPHdr::url_get(), URL_LEN_WS, URL_LEN_WSS, URL_SCHEME_WS, URL_SCHEME_WSS, URL_WKSIDX_HTTP, and URL_WKSIDX_HTTPS.
Referenced by handle_upgrade_request().
void HttpTransact::HandleApiErrorJump | ( | State * | s | ) | [static] |
The API indicated an error. Lets use a >=400 error from the state (if one's set) or fallback to a generic HTTP/1.X 500 INKApi Error
Definition at line 1460 of file HttpTransact.cc.
References build_response(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, DebugTxn, MIMEHdr::fields_clear(), HttpTransact::State::hdr_info, http_hdr_reason_lookup(), HttpTransact::State::http_return_code, HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_INTERNAL_SERVER_ERROR, HttpTransact::ConnectionAttributes::http_version, HttpTransact::State::next_hop_scheme, SM_ACTION_INTERNAL_CACHE_NOOP, HttpTransact::State::source, TRANSACT_RETURN, URL_WKSIDX_HTTP, and HTTPHdr::valid().
Referenced by HttpSM::do_cache_prepare_update(), HandleUpdateCachedObject(), HttpSM::state_api_callout(), and HttpSM::state_common_wait_for_transform_read().
static void HttpTransact::HandleAuth | ( | State * | s | ) | [static] |
static void HttpTransact::HandleAuthFailed | ( | State * | s | ) | [static] |
void HttpTransact::HandleBadPushRespHdr | ( | State * | s | ) | [static] |
Definition at line 2142 of file HttpTransact.cc.
References HandlePushError().
Referenced by HttpSM::state_read_push_response_header().
void HttpTransact::HandleBlindTunnel | ( | State * | s | ) | [static] |
Definition at line 597 of file HttpTransact.cc.
References ats_ip_ntop(), bootstrap_state_variables_from_request(), build_error_response(), HttpTransact::_HeaderInfo::client_request, HTTPHdr::create(), HttpTransact::State::current, DebugTxn, Log::error(), NetVConnection::get_local_addr(), NetVConnection::get_local_port(), HttpClientSession::get_netvc(), HandleRequest(), HttpTransact::State::hdr_info, URL::host_get(), URL::host_set(), HTTP_LEN_CONNECT, atscppapi::HTTP_METHOD_CONNECT, HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_TYPE_REQUEST, is_debug_tag_set, HTTPHdr::method_set(), HttpTransact::_CurrentInfo::mode, URL::port_get(), URL::port_set(), request_url_remap(), URL::scheme_set(), SM_ACTION_SEND_ERROR_CACHE_NOOP, HttpTransact::State::state_machine, TRANSACT_RETURN, HttpTransact::State::transparent_passthrough, HttpSM::ua_session, HTTPHdr::url_create(), HTTPHdr::url_get(), URL_LEN_TUNNEL, URL_REMAP_ALL, URL_REMAP_DEFAULT, url_remap_mode, URL_SCHEME_TUNNEL, HTTPHdr::url_set(), and HTTPHdr::version_set().
Referenced by HttpSM::setup_blind_tunnel_port().
void HttpTransact::HandleCacheOpenRead | ( | State * | s | ) | [static] |
Definition at line 2176 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::cache_info, CACHE_LOOKUP_DOC_BUSY, HttpTransact::State::cache_lookup_result, DebugTxn, HttpTransact::State::force_dns, HandleCacheOpenReadHitFreshness(), HandleCacheOpenReadMiss(), HandleCacheOpenReadPush(), HTTP_WKSIDX_PUSH, HttpTransact::State::method, HttpTransact::_CacheLookupInfo::object_read, OSDNSLookup(), SET_VIA_STRING, SM_ACTION_API_READ_CACHE_HDR, SM_ACTION_DNS_LOOKUP, TRANSACT_RETURN, VIA_DETAIL_CACHE, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_CACHE_TYPE, and VIA_DETAIL_MISS_NOT_CACHED.
Referenced by HttpSM::state_cache_open_read().
void HttpTransact::HandleCacheOpenReadHit | ( | State * | s | ) | [static] |
Definition at line 2557 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::ConnectionAttributes::addr, HttpTransact::State::api_update_cached_object, ats_is_ip(), HttpTransact::_DNSLookupInfo::attempts, AUTHENTICATION_CACHE_AUTH, AUTHENTICATION_MUST_PROXY, AUTHENTICATION_MUST_REVALIDATE, AUTHENTICATION_SUCCESS, AuthenticationNeeded(), build_request(), build_response_from_cache(), CACHE_AUTH_STALE, HttpTransact::State::cache_info, CACHE_LOOKUP_HIT_FRESH, CACHE_LOOKUP_HIT_STALE, CACHE_LOOKUP_HIT_WARNING, HttpTransact::State::cache_lookup_result, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, DebugTxn, HttpTransact::State::dns_info, find_server_and_update_current_info(), handle_parent_died(), HandleCacheOpenReadMiss(), HttpTransact::State::hdr_info, how_to_open_connection(), HttpTransact::State::http_config_param, HTTP_VALUE_NO_CACHE, HttpTransact::ConnectionAttributes::http_version, HTTP_WARNING_CODE_HERUISTIC_EXPIRATION, HTTP_WARNING_CODE_NONE, HTTP_WARNING_CODE_REVALIDATION_FAILED, icp_dynamic_enabled, HttpConfigParams::icp_enabled, HttpTransact::State::icp_info, ICP_SUGGESTED_HOST, ink_assert, ink_release_assert, HTTPHdr::is_cache_control_set(), is_cache_response_returnable(), HTTPHdr::is_pragma_no_cache_set(), HttpTransact::_CacheLookupInfo::is_ram_cache_hit, is_server_negative_cached(), is_stale_cache_response_returnable(), issue_revalidate(), HttpTransact::ConnectionAttributes::keep_alive, OverridableHttpConfigParams::keep_alive_enabled_out, HttpTransact::State::next_action, HttpTransact::_CacheLookupInfo::object_read, HttpTransact::_CacheLookupInfo::object_store, ORIGIN_SERVER, OSDNSLookup(), PARENT_PROXY, HttpTransact::State::pending_work, PPDNSLookup(), HttpTransact::_CurrentInfo::request_to, HttpTransact::State::saved_update_cache_action, HttpTransact::State::saved_update_next_action, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, HTTPVersion::set(), SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, SM_ACTION_ORIGIN_SERVER_OPEN, SM_ACTION_ORIGIN_SERVER_RAW_OPEN, HttpConfigParams::stale_icp_enabled, HttpTransact::State::stale_icp_lookup, TRANSACT_RETURN, HttpTransact::State::txn_conf, UNDEFINED_LOOKUP, UPDATE_CACHED_OBJECT_CONTINUE, update_current_info(), VIA_CACHE_RESULT, VIA_DETAIL_CACHE, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_CACHE_TYPE, VIA_DETAIL_MISS_EXPIRED, VIA_DETAIL_MISS_METHOD, VIA_IN_CACHE_FRESH, VIA_IN_RAM_CACHE_FRESH, and HttpTransact::State::www_auth_content.
Referenced by HandleCacheOpenReadHitFreshness(), and OSDNSLookup().
void HttpTransact::HandleCacheOpenReadHitFreshness | ( | State * | s | ) | [static] |
Definition at line 2369 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::cache_info, CACHE_LOOKUP_HIT_STALE, CACHE_LOOKUP_MISS, CACHE_LOOKUP_NONE, HttpTransact::State::cache_lookup_result, CallOSDNSLookup(), HttpTransact::_HeaderInfo::client_request, HttpTransact::State::client_request_time, DebugTxn, delete_all_document_alternates_and_return(), HttpTransact::State::force_dns, FRESHNESS_FRESH, FRESHNESS_STALE, FRESHNESS_WARNING, HandleCacheOpenReadHit(), HttpTransact::State::hdr_info, ink_assert, ink_release_assert, HttpTransact::State::is_revalidation_necessary, min(), need_to_revalidate(), HttpTransact::State::next_action, HttpTransact::_CacheLookupInfo::object_read, HttpTransact::State::request_sent_time, HttpTransact::State::response_received_time, SET_VIA_STRING, SM_ACTION_API_CACHE_LOOKUP_COMPLETE, TRANSACT_RETURN, UNDEFINED_TIME, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_MISS_EXPIRED, and what_is_document_freshness().
Referenced by handle_cache_write_lock(), and HandleCacheOpenRead().
void HttpTransact::HandleCacheOpenReadMiss | ( | State * | s | ) | [static] |
Definition at line 3024 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::ConnectionAttributes::addr, HttpTransact::State::api_req_cacheable, ats_is_ip(), build_error_response(), build_request(), HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_range_write, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, DebugTxn, delete_all_document_alternates_and_return(), does_method_require_cache_copy_deletion(), find_server_and_update_current_info(), GET_VIA_STRING, handle_parent_died(), HttpTransact::State::hdr_info, how_to_open_connection(), HttpTransact::State::http_config_param, HTTP_STATUS_GATEWAY_TIMEOUT, HTTP_VALUE_NO_CACHE, HTTP_VALUE_ONLY_IF_CACHED, HttpTransact::ConnectionAttributes::http_version, icp_dynamic_enabled, HttpConfigParams::icp_enabled, ink_release_assert, HTTPHdr::is_cache_control_set(), HTTPHdr::is_pragma_no_cache_set(), HttpTransact::State::method, MIME_PRESENCE_RANGE, HttpTransact::State::next_action, HttpConfigParams::no_dns_forward_to_parent, HttpTransact::_CacheLookupInfo::object_read, PARENT_PROXY, PPDNSLookup(), MIMEHdr::presence(), RANGE_NOT_HANDLED, RANGE_NOT_SATISFIABLE, HttpTransact::State::range_setup, HttpTransact::State::request_sent_time, HttpTransact::_CurrentInfo::request_to, HttpTransact::State::response_received_time, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, TRANSACT_RETURN, HttpTransact::State::txn_conf, VIA_CACHE_MISS, VIA_CACHE_RESULT, VIA_DETAIL_CACHE_LOOKUP, and VIA_DETAIL_MISS_NOT_CACHED.
Referenced by build_response_from_cache(), HandleCacheOpenRead(), HandleCacheOpenReadHit(), and OSDNSLookup().
void HttpTransact::HandleCacheOpenReadPush | ( | State * | s, | |
bool | read_successful | |||
) | [static] |
Definition at line 2032 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::cache_info, HandlePushResponseHdr(), SM_ACTION_READ_PUSH_HDR, and TRANSACT_RETURN.
Referenced by HandleCacheOpenRead().
void HttpTransact::HandleFiltering | ( | State * | s | ) | [static] |
Definition at line 1865 of file HttpTransact.cc.
References build_error_response(), DebugTxn, DecideCacheLookup(), HttpTransact::State::http_config_param, HTTP_STATUS_FORBIDDEN, HTTP_WKSIDX_PUSH, ink_release_assert, HttpTransact::State::method, HttpConfigParams::push_method_enabled, SET_VIA_STRING, SM_ACTION_SEND_ERROR_CACHE_NOOP, TRANSACT_RETURN, VIA_DETAIL_TUNNEL, and VIA_DETAIL_TUNNEL_NO_FORWARD.
Referenced by HttpSM::set_next_state().
void HttpTransact::HandleICPLookup | ( | State * | s | ) | [static] |
Definition at line 3121 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, Arena::alloc(), HttpTransact::State::arena, ats_ip4_set(), ats_ip_addr_cmp(), ats_is_ip(), build_request(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, DebugTxn, find_server_and_update_current_info(), HttpTransact::State::hdr_info, how_to_open_connection(), http_icp_suggested_lookups_stat, HTTP_INCREMENT_TRANS_STAT, HttpTransact::ConnectionAttributes::http_version, HttpTransact::State::icp_info, HttpTransact::State::icp_ip_result, HttpTransact::State::icp_lookup_success, ICP_SUGGESTED_HOST, ink_assert, ink_release_assert, Machine::instance(), HttpTransact::ConnectionAttributes::keep_alive, OverridableHttpConfigParams::keep_alive_enabled_out, HttpTransact::ConnectionAttributes::name, HttpTransact::State::next_action, HttpTransact::State::next_hop_scheme, HttpTransact::State::parent_info, PARENT_PROXY, HttpTransact::ConnectionAttributes::port, PPDNSLookup(), HttpTransact::_CurrentInfo::request_to, IpEndpoint::sa, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, HTTPVersion::set(), SET_VIA_STRING, SM_ACTION_DNS_LOOKUP, HttpTransact::State::stale_icp_lookup, TRANSACT_RETURN, HttpTransact::State::txn_conf, update_current_info(), URL_WKSIDX_HTTP, HTTPHdr::valid(), VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_CACHE_TYPE, VIA_DETAIL_ICP, and VIA_DETAIL_MISS_NOT_CACHED.
Referenced by HttpSM::state_icp_lookup().
bool HttpTransact::handleIfRedirect | ( | State * | s | ) | [static] |
Definition at line 1242 of file HttpTransact.cc.
References HttpTransact::State::arena, build_error_response(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HdrHeapSDKHandle::destroy(), HttpTransact::State::hdr_info, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_MOVED_TEMPORARILY, HTTP_STATUS_TEMPORARY_REDIRECT, HTTP_VERSION, PERMANENT_REDIRECT, HttpTransact::State::remap_redirect, request_url_remap_redirect(), Arena::str_free(), URL::string_get(), and TEMPORARY_REDIRECT.
Referenced by EndRemapRequest().
void HttpTransact::HandlePushCacheWrite | ( | State * | s | ) | [static] |
Definition at line 2092 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::cache_info, CACHE_PREPARE_TO_UPDATE, CACHE_PREPARE_TO_WRITE, CACHE_WL_FAIL, CACHE_WL_INIT, CACHE_WL_READ_RETRY, CACHE_WL_SUCCESS, HandlePushError(), HttpTransact::State::hdr_info, ink_release_assert, HttpTransact::_CacheLookupInfo::object_store, HttpTransact::_HeaderInfo::server_request, HttpTransact::_HeaderInfo::server_response, set_headers_for_cache_write(), SM_ACTION_STORE_PUSH_BODY, TRANSACT_RETURN, and HttpTransact::_CacheLookupInfo::write_lock_state.
Referenced by HandlePushResponseHdr().
void HttpTransact::HandlePushError | ( | State * | s, | |
const char * | reason | |||
) | [static] |
Definition at line 2148 of file HttpTransact.cc.
References build_error_response(), HttpTransact::State::client_info, HTTP_STATUS_BAD_REQUEST, HttpTransact::ConnectionAttributes::keep_alive, HttpSM::set_ua_half_close_flag(), and HttpTransact::State::state_machine.
Referenced by DecideCacheLookup(), HandleBadPushRespHdr(), HandlePushCacheWrite(), HandlePushResponseHdr(), and HandlePushTunnelFailure().
void HttpTransact::HandlePushResponseHdr | ( | State * | s | ) | [static] |
Definition at line 2052 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::cache_info, CACHE_PREPARE_TO_UPDATE, CACHE_PREPARE_TO_WRITE, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::cop_test_page, HTTPHdr::copy(), HTTPHdr::create(), DUMP_HEADER, HandlePushCacheWrite(), HandlePushError(), HttpTransact::State::hdr_info, HTTP_LEN_GET, atscppapi::HTTP_METHOD_GET, HTTP_TYPE_REQUEST, ink_assert, ink_cluster_time(), is_response_cacheable(), HTTPHdr::method_set(), HttpSM::pushed_response_hdr_bytes, HttpTransact::_HeaderInfo::request_content_length, HttpTransact::State::request_sent_time, HttpTransact::State::response_received_time, HttpTransact::_HeaderInfo::server_request, HttpTransact::_HeaderInfo::server_response, SM_ACTION_CACHE_ISSUE_WRITE, HttpTransact::State::state_machine, HttpTransact::State::state_machine_id, TRANSACT_RETURN, and MIMEHdr::value_set().
Referenced by HandleCacheOpenReadPush(), and HttpSM::state_read_push_response_header().
void HttpTransact::HandlePushTunnelFailure | ( | State * | s | ) | [static] |
Definition at line 2136 of file HttpTransact.cc.
References HandlePushError().
Referenced by HttpSM::tunnel_handler_push().
void HttpTransact::HandlePushTunnelSuccess | ( | State * | s | ) | [static] |
Definition at line 2122 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, build_response(), CACHE_DO_REPLACE, CACHE_DO_WRITE, HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::hdr_info, HTTP_STATUS_CREATED, HTTP_STATUS_OK, HttpTransact::ConnectionAttributes::http_version, ink_assert, SM_ACTION_INTERNAL_CACHE_NOOP, and TRANSACT_RETURN.
Referenced by HttpSM::tunnel_handler_push().
void HttpTransact::HandleRequest | ( | State * | s | ) | [static] |
Definition at line 1271 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::ConnectionAttributes::addr, HttpTransact::State::api_release_server_session, ats_ip_copy(), ats_ip_invalidate(), ats_ip_pton(), ats_is_ip(), build_error_response(), OverridableHttpConfigParams::cache_http, HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::cop_test_page, HttpTransact::State::current, DebugTxn, HttpRequestData::dest_ip, HttpTransact::State::dns_info, DUMP_HEADER, HttpSM::enable_redirection, HttpTransact::State::force_dns, handle_internal_request(), handle_trace_and_options_requests(), HttpTransact::State::hdr_info, ControlMatcher< Data, Result >::hostMatch, HttpTransact::State::http_config_param, http_incoming_requests_stat, HTTP_INCREMENT_TRANS_STAT, http_invalid_client_requests_stat, HTTP_PLUGIN_AS_INTERCEPT, HTTP_STATUS_BAD_GATEWAY, https_incoming_requests_stat, initialize_state_variables_from_request(), ink_assert, is_debug_tag_set, is_request_cache_lookupable(), is_request_valid(), HttpTransact::_DNSLookupInfo::lookup_name, HTTPHdr::m_http, HttpTransact::_CurrentInfo::mode, HttpTransact::ConnectionAttributes::name, HttpTransact::State::next_action, HttpConfigParams::no_dns_forward_to_parent, HttpConfigParams::no_origin_server_dns, obj_describe(), OSDNSLookup(), HttpTransact::State::parent_params, ParentConfigParams::parentExists(), ParentConfigParams::ParentTable, HttpSM::plugin_tunnel_type, HttpTransact::ConnectionAttributes::port_attribute, HttpTransact::_RedirectInfo::redirect_in_process, HttpTransact::State::redirect_info, HttpTransact::State::request_data, HttpTransact::State::scheme, HttpTransact::State::server_info, HttpTransact::_HeaderInfo::server_request, setup_plugin_request_intercept(), SM_ACTION_CACHE_LOOKUP, SM_ACTION_DNS_LOOKUP, SM_ACTION_INTERNAL_CACHE_NOOP, SM_ACTION_INTERNAL_REQUEST, SM_ACTION_SEND_ERROR_CACHE_NOOP, HttpTransact::State::srv_lookup, StartAccessControl(), HttpTransact::State::state_machine, HttpTransact::State::state_machine_id, TRANSACT_RETURN, HttpProxyPort::TRANSPORT_SSL, HttpTransact::State::txn_conf, update_cache_control_information_from_config(), URL_WKSIDX_HTTPS, and HTTPHdr::valid().
Referenced by EndRemapRequest(), HttpSM::handle_api_return(), handle_websocket_connection(), HandleBlindTunnel(), StartRemapRequest(), and HttpSM::state_remap_request().
void HttpTransact::HandleRequestAuthorized | ( | State * | s | ) | [static] |
Definition at line 1852 of file HttpTransact.cc.
References DecideCacheLookup(), HttpTransact::State::force_dns, SM_ACTION_API_OS_DNS, and TRANSACT_RETURN.
Referenced by StartAccessControl().
void HttpTransact::HandleResponse | ( | State * | s | ) | [static] |
Definition at line 3256 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, CACHE_DO_LOOKUP, CACHE_DO_SERVE, CACHE_DO_WRITE, HttpTransact::State::cache_info, CACHE_PREPARE_TO_DELETE, CACHE_PREPARE_TO_UPDATE, CACHE_PREPARE_TO_WRITE, HttpTransact::State::cop_test_page, HttpTransact::State::current, DebugTxn, DUMP_HEADER, handle_response_from_icp_suggested_host(), handle_response_from_parent(), handle_response_from_server(), HttpTransact::State::hdr_info, http_incoming_responses_stat, HTTP_INCREMENT_TRANS_STAT, ICP_SUGGESTED_HOST, initialize_state_variables_from_response(), ink_assert, ink_cluster_time(), ink_release_assert, is_response_valid(), HttpTransact::_CurrentInfo::now, ORIGIN_SERVER, PARENT_PROXY, HttpTransact::State::request_sent_time, HttpTransact::_CurrentInfo::request_to, HttpTransact::State::response_received_time, HttpTransact::_HeaderInfo::server_response, HttpTransact::State::source, HttpTransact::State::state_machine_id, and UNDEFINED_LOOKUP.
Referenced by handle_100_continue_response(), HttpSM::handle_post_failure(), HttpSM::handle_server_setup_error(), LookupSkipOpenServer(), OSDNSLookup(), HttpSM::state_api_callout(), HttpSM::state_http_server_open(), HttpSM::state_raw_http_server_open(), and HttpSM::state_read_server_response_header().
void HttpTransact::HandleStatPage | ( | State * | s | ) | [static] |
Definition at line 3366 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, build_response(), HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, HttpTransact::State::hdr_info, HttpTransact::ConnectionAttributes::http_version, HttpTransact::State::internal_msg_buffer, HttpTransact::State::internal_msg_buffer_size, HttpTransact::State::internal_msg_buffer_type, MIME_FIELD_CONTENT_TYPE, MIME_LEN_CONTENT_TYPE, HttpTransact::State::next_action, MIMEHdr::set_content_length(), and MIMEHdr::value_set().
Referenced by HttpSM::state_handle_stat_page().
void HttpTransact::HandleUpdateCachedObject | ( | State * | s | ) | [static] |
Definition at line 3320 of file HttpTransact.cc.
References HttpTransact::State::api_update_cached_object, HttpTransact::State::cache_info, CACHE_WL_SUCCESS, HandleApiErrorJump(), HandleUpdateCachedObjectContinue(), ink_assert, HttpTransact::_CacheLookupInfo::object_read, HttpTransact::_CacheLookupInfo::object_store, HTTPInfo::request_get(), HttpTransact::State::request_sent_time, HTTPInfo::request_sent_time_get(), HTTPInfo::request_set(), HTTPInfo::response_get(), HttpTransact::State::response_received_time, HTTPInfo::response_received_time_get(), SM_ACTION_CACHE_ISSUE_UPDATE, TRANSACT_RETURN, UPDATE_CACHED_OBJECT_CONTINUE, HTTPInfo::valid(), and HttpTransact::_CacheLookupInfo::write_lock_state.
void HttpTransact::HandleUpdateCachedObjectContinue | ( | State * | s | ) | [static] |
Definition at line 3347 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::State::api_update_cached_object, HttpTransact::State::cache_info, ink_assert, HttpTransact::State::next_action, HttpTransact::State::saved_update_cache_action, HttpTransact::State::saved_update_next_action, and UPDATE_CACHED_OBJECT_CONTINUE.
Referenced by HandleUpdateCachedObject().
void HttpTransact::histogram_request_document_size | ( | State * | s, | |
int64_t | size | |||
) | [static] |
Definition at line 8294 of file HttpTransact.cc.
References HTTP_INCREMENT_TRANS_STAT, http_request_document_size_100_stat, http_request_document_size_10K_stat, http_request_document_size_1K_stat, http_request_document_size_1M_stat, http_request_document_size_3K_stat, http_request_document_size_5K_stat, and http_request_document_size_inf_stat.
Referenced by update_size_and_time_stats().
void HttpTransact::histogram_response_document_size | ( | State * | s, | |
int64_t | size | |||
) | [static] |
Definition at line 8273 of file HttpTransact.cc.
References HTTP_INCREMENT_TRANS_STAT, http_response_document_size_100_stat, http_response_document_size_10K_stat, http_response_document_size_1K_stat, http_response_document_size_1M_stat, http_response_document_size_3K_stat, http_response_document_size_5K_stat, and http_response_document_size_inf_stat.
Referenced by update_size_and_time_stats().
void HttpTransact::initialize_state_variables_for_origin_server | ( | State * | s, | |
HTTPHdr * | incoming_request, | |||
bool | second_time | |||
) | [static] |
Definition at line 5448 of file HttpTransact.cc.
References HttpTransact::State::arena, HttpTransact::_DNSLookupInfo::attempts, HttpTransact::State::dns_info, HTTPHdr::host_get(), ink_assert, HttpTransact::_DNSLookupInfo::lookup_name, HttpTransact::ConnectionAttributes::name, HttpTransact::ConnectionAttributes::port, HTTPHdr::port_get(), HttpTransact::State::server_info, and Arena::str_store().
Referenced by how_to_open_connection().
void HttpTransact::initialize_state_variables_from_request | ( | State * | s, | |
HTTPHdr * | obsolete_incoming_request | |||
) | [static] |
Definition at line 5473 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::ConnectionAttributes::addr, HttpTransact::State::api_info, HttpRequestData::api_info, HttpTransact::State::arena, ats_ip_copy(), HttpTransact::_DNSLookupInfo::attempts, HttpTransact::State::cache_info, CHUNKED_ENCODING, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::client_request_time, HttpTransact::State::current, DebugTxn, HttpRequestData::dest_ip, HttpTransact::State::dns_info, Error, HttpTransact::_HeaderInfo::extension_method, MIMEHdr::field_find(), NetVConnection::get_local_port(), HttpClientSession::get_netvc(), HttpRequestData::hdr, HttpTransact::State::hdr_info, HTTPHdr::host_get(), HttpRequestData::hostname_str, http_connect_requests_stat, http_delete_requests_stat, http_extension_method_requests_stat, http_get_requests_stat, http_head_requests_stat, HTTP_INCREMENT_TRANS_STAT, HTTP_KEEPALIVE, http_options_requests_stat, http_post_requests_stat, http_purge_requests_stat, http_push_requests_stat, http_put_requests_stat, http_trace_requests_stat, HttpTransact::ConnectionAttributes::http_version, HTTP_WKSIDX_CONNECT, HTTP_WKSIDX_DELETE, HTTP_WKSIDX_GET, HTTP_WKSIDX_HEAD, HTTP_WKSIDX_OPTIONS, HTTP_WKSIDX_POST, HTTP_WKSIDX_PURGE, HTTP_WKSIDX_PUSH, HTTP_WKSIDX_PUT, HTTP_WKSIDX_TRACE, HttpRequestData::incoming_port, ink_assert, is_header_keep_alive(), HttpTransact::State::is_websocket, HttpTransact::ConnectionAttributes::keep_alive, OverridableHttpConfigParams::keep_alive_enabled_in, HttpTransact::_SquidLogInfo::log_code, HttpTransact::_DNSLookupInfo::looking_up, HttpTransact::_DNSLookupInfo::lookup_name, HttpTransact::State::method, HTTPHdr::method_get_wksidx(), MIME_FIELD_CONNECTION, MIME_FIELD_PROXY_CONNECTION, MIME_LEN_CONNECTION, MIME_LEN_PROXY_CONNECTION, MIME_PRESENCE_IF_MODIFIED_SINCE, MIME_PRESENCE_IF_NONE_MATCH, HttpTransact::_CurrentInfo::mode, HttpTransact::ConnectionAttributes::name, HttpTransact::State::next_hop_scheme, HttpTransact::ConnectionAttributes::pipeline_possible, HttpTransact::ConnectionAttributes::port, HTTPHdr::port_get(), MIMEHdr::presence(), HttpTransact::ConnectionAttributes::proxy_connect_hdr, HttpTransact::_RedirectInfo::redirect_in_process, HttpTransact::State::redirect_info, HttpTransact::_HeaderInfo::request_content_length, HttpTransact::State::request_data, HttpTransact::State::scheme, URL::scheme_get_wksidx(), HttpTransact::State::server_info, SET_VIA_STRING, HttpTransact::State::squid_codes, HttpRequestData::src_ip, HttpTransact::State::state_machine, Arena::str_store(), HttpTransact::ConnectionAttributes::transfer_encoding, HttpTransact::State::txn_conf, HttpSM::ua_session, HTTPHdr::url_get(), URL_WKSIDX_HTTP, URL_WKSIDX_HTTPS, URL_WKSIDX_WS, URL_WKSIDX_WSS, VIA_CLIENT_IMS, VIA_CLIENT_REQUEST, VIA_CLIENT_SIMPLE, VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_METHOD, and HttpRequestData::xact_start.
Referenced by EndRemapRequest(), and HandleRequest().
void HttpTransact::initialize_state_variables_from_response | ( | State * | s, | |
HTTPHdr * | incoming_response | |||
) | [static] |
Definition at line 5615 of file HttpTransact.cc.
References HttpTransact::State::cache_info, cl, HttpTransact::State::client_info, HttpTransact::State::cop_test_page, HttpTransact::State::current, DebugTxn, HttpTransact::_CacheLookupInfo::directives, HttpTransactHeaders::does_server_allow_response_to_be_stored(), HttpTransact::_CacheDirectives::does_server_permit_storing, HttpClientSession::f_outbound_transparent, MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_delete(), MIMEHdr::field_find(), MIMEHdr::field_value_set(), MIMEHdr::get_content_length(), HdrCsvIter::get_first(), HdrCsvIter::get_next(), HttpTransact::State::hdr_info, hdrtoken_string_to_wks(), HttpTransact::State::http_config_param, HTTP_KEEPALIVE, HTTP_UNDEFINED_CL, HTTP_VALUE_CHUNKED, ICP_SUGGESTED_HOST, is_header_keep_alive(), is_response_body_precluded(), HttpTransact::State::is_upgrade_request, HttpTransact::ConnectionAttributes::keep_alive, HdrHeapSDKHandle::m_heap, MIMEHdr::m_mime, HttpTransact::State::method, MIME_FIELD_CONNECTION, MIME_FIELD_PROXY_CONNECTION, MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_CONNECTION, MIME_LEN_PROXY_CONNECTION, MIME_LEN_TRANSFER_ENCODING, MIME_PRESENCE_CONTENT_LENGTH, MIME_PRESENCE_TRANSFER_ENCODING, MIMEField::name_set(), ORIGIN_SERVER, PARENT_PROXY, MIMEHdr::presence(), HttpTransact::_CurrentInfo::request_to, HttpTransact::_HeaderInfo::response_content_length, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, HttpTransact::_HeaderInfo::server_response, HttpTransact::State::state_machine, HTTPHdr::status_get(), HttpSM::t_state, HttpTransact::ConnectionAttributes::transfer_encoding, HttpTransact::_HeaderInfo::trust_response_cl, HttpSM::ua_session, HttpConfigParams::use_client_source_port, MIMEField::value_append(), and HTTPHdr::version_get().
Referenced by HandleResponse().
bool HttpTransact::is_cache_response_returnable | ( | State * | s | ) | [static] |
Definition at line 5746 of file HttpTransact.cc.
References HttpTransact::State::api_resp_cacheable, HttpTransact::State::cache_control, HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_responses_to_cookies, HttpTransact::_HeaderInfo::client_request, HttpTransact::_CacheLookupInfo::directives, do_cookies_prevent_caching(), HttpTransact::_CacheDirectives::does_client_permit_lookup, HttpTransact::State::hdr_info, HttpTransact::State::http_config_param, HttpTransactHeaders::is_method_cacheable(), HttpTransact::State::method, CacheControlResult::never_cache, HttpTransact::_CacheLookupInfo::object_read, HTTPInfo::request_get(), HTTPInfo::response_get(), SET_VIA_STRING, CacheControlResult::ttl_in_cache, HttpTransact::State::txn_conf, VIA_CACHE_RESULT, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_MISS_CLIENT, VIA_DETAIL_MISS_CONFIG, VIA_DETAIL_MISS_COOKIE, VIA_DETAIL_MISS_METHOD, and VIA_IN_CACHE_NOT_ACCEPTABLE.
Referenced by HandleCacheOpenReadHit(), and need_to_revalidate().
static bool HttpTransact::is_connection_collapse_checks_success | ( | State * | s | ) | [static] |
bool HttpTransact::is_request_cache_lookupable | ( | State * | s | ) | [static] |
Definition at line 5907 of file HttpTransact.cc.
References HttpTransact::State::api_req_cacheable, HttpTransact::State::cache_control, OverridableHttpConfigParams::cache_http, HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_range_lookup, OverridableHttpConfigParams::cache_urls_that_look_dynamic, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, MIMEHdr::field_find(), HttpTransact::State::hdr_info, HttpTransactHeaders::is_method_cache_lookupable(), HttpTransact::_CacheLookupInfo::lookup_count, HttpTransact::State::method, MIME_FIELD_MAX_FORWARDS, MIME_LEN_MAX_FORWARDS, MIME_PRESENCE_MAX_FORWARDS, MIME_PRESENCE_RANGE, HttpTransact::_CurrentInfo::mode, MIMEHdr::presence(), SET_VIA_STRING, CacheControlResult::ttl_in_cache, TUNNELLING_PROXY, HttpTransact::State::txn_conf, HTTPHdr::url_get(), url_looks_dynamic(), MIMEField::value_get_int(), VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_CACHE_OFF, VIA_DETAIL_TUNNEL_HEADER_FIELD, VIA_DETAIL_TUNNEL_METHOD, and VIA_DETAIL_TUNNEL_URL.
Referenced by DecideCacheLookup(), find_server_and_update_current_info(), HandleRequest(), and is_response_cacheable().
Definition at line 7631 of file HttpTransact.cc.
References HttpTransact::State::api_req_cacheable, OverridableHttpConfigParams::cache_range_write, HTTP_WKSIDX_GET, HttpTransact::State::method, MIME_PRESENCE_AUTHORIZATION, MIME_PRESENCE_RANGE, MIMEHdr::presence(), and HttpTransact::State::txn_conf.
Referenced by build_request(), and handle_cache_operation_on_forward_server_response().
bool HttpTransact::is_request_retryable | ( | State * | s | ) | [static] |
Definition at line 6347 of file HttpTransact.cc.
References HttpTransact::State::api_info, HttpTransact::State::hdr_info, HTTP_NO_PLUGIN_TUNNEL, HTTP_PLUGIN_AS_SERVER, HttpSM::plugin_tunnel_type, HttpTransact::_HeaderInfo::request_body_start, _HttpApiInfo::retry_intercept_failures, and HttpTransact::State::state_machine.
Referenced by handle_response_from_icp_suggested_host(), handle_response_from_parent(), and handle_response_from_server().
Definition at line 6237 of file HttpTransact.cc.
References BAD_CONNECT_PORT, BAD_HTTP_HEADER_SYNTAX, build_error_response(), check_request_validity(), HttpTransact::State::current, DebugTxn, FAILED_PROXY_AUTHORIZATION, HttpTransact::State::http_config_param, HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_LENGTH_REQUIRED, HTTP_STATUS_NOT_ACCEPTABLE, HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, INVALID_POST_CONTENT_LENGTH, METHOD_NOT_SUPPORTED, MISSING_HOST_FIELD, HttpTransact::_CurrentInfo::mode, NO_POST_CONTENT_LENGTH, NO_REQUEST_HEADER_ERROR, NO_REQUEST_SCHEME, NON_EXISTANT_REQUEST_HEADER, URL::port_get(), HttpConfigParams::reverse_proxy_enabled, SCHEME_NOT_SUPPORTED, SET_VIA_STRING, UNACCEPTABLE_TE_REQUIRED, HTTPHdr::url_get(), VIA_DETAIL_TUNNEL, and VIA_DETAIL_TUNNEL_NO_FORWARD.
Referenced by HandleRequest(), and HttpTransact_is_request_valid().
bool HttpTransact::is_response_cacheable | ( | State * | s, | |
HTTPHdr * | request, | |||
HTTPHdr * | response | |||
) | [static] |
Definition at line 6014 of file HttpTransact.cc.
References HttpTransact::State::api_req_cacheable, HttpTransact::State::api_server_response_no_store, HttpTransact::State::cache_control, OverridableHttpConfigParams::cache_ignore_auth, HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_required_headers, HttpConfigParams::CACHE_REQUIRED_HEADERS_AT_LEAST_LAST_MODIFIED, HttpConfigParams::CACHE_REQUIRED_HEADERS_CACHE_CONTROL, HttpConfigParams::CACHE_REQUIRED_HEADERS_NONE, OverridableHttpConfigParams::cache_responses_to_cookies, HttpTransact::State::client_info, DebugTxn, HttpTransact::_CacheLookupInfo::directives, HttpTransact::State::dns_info, do_cookies_prevent_caching(), HttpTransact::_CacheDirectives::does_client_permit_storing, HttpTransact::_CacheDirectives::does_config_permit_storing, HttpTransact::_CacheDirectives::does_server_permit_storing, MIMEHdr::get_cooked_cc_mask(), MIMEHdr::get_date(), MIMEHdr::get_last_modified(), HttpTransact::_SquidLogInfo::hit_miss_code, HttpTransact::State::http_config_param, HTTP_STATUS_GONE, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_MOVED_TEMPORARILY, HTTP_STATUS_MULTIPLE_CHOICES, HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, HTTP_STATUS_NOT_MODIFIED, HTTP_STATUS_OK, HTTP_STATUS_PARTIAL_CONTENT, HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, HTTP_STATUS_RANGE_NOT_SATISFIABLE, HTTP_STATUS_SEE_OTHER, HTTP_STATUS_TEMPORARY_REDIRECT, HTTP_STATUS_UNAUTHORIZED, HTTP_WKSIDX_POST, CacheControlResult::ignore_client_no_cache, CacheControlResult::ignore_server_no_cache, HttpTransactHeaders::is_method_cacheable(), is_request_cache_lookupable(), HttpTransact::ConnectionAttributes::is_transparent, HttpTransact::_DNSLookupInfo::lookup_validated, HTTPHdr::method_get_wksidx(), MIME_COOKED_MASK_CC_MAX_AGE, MIME_PRESENCE_EXPIRES, MIME_PRESENCE_WWW_AUTHENTICATE, OverridableHttpConfigParams::negative_caching_enabled, CacheControlResult::never_cache, MIMEHdr::presence(), RANGE_NOT_HANDLED, HttpTransact::State::range_setup, response_cacheable_indicated_by_cc(), HttpTransact::State::squid_codes, SQUID_MISS_HTTP_NO_DLE, HTTPHdr::status_get(), CacheControlResult::ttl_in_cache, HttpTransact::State::txn_conf, and HttpTransact::State::www_auth_content.
Referenced by handle_cache_operation_on_forward_server_response(), HandlePushResponseHdr(), and TSHttpTxnIsCacheable().
Definition at line 6368 of file HttpTransact.cc.
References ACTIVE_TIMEOUT, BOGUS_OR_NO_DATE_IN_RESPONSE, check_response_validity(), CONGEST_CONTROL_CONGESTED_ON_F, CONGEST_CONTROL_CONGESTED_ON_M, CONNECTION_ALIVE, CONNECTION_CLOSED, CONNECTION_ERROR, CONNECTION_OPEN_FAILED, HttpTransact::State::current, DebugTxn, HttpTransact::State::hdr_info, INACTIVE_TIMEOUT, ink_assert, MISSING_REASON_PHRASE, MISSING_STATUS_CODE, NO_RESPONSE_HEADER_ERROR, NON_EXISTANT_RESPONSE_HEADER, NOT_A_RESPONSE_HEADER, OPEN_RAW_ERROR, PARSE_ERROR, HttpTransact::_HeaderInfo::response_error, HttpTransact::_CurrentInfo::state, and STATUS_CODE_SERVER_ERROR.
Referenced by HandleResponse().
bool HttpTransact::is_server_negative_cached | ( | State * | s | ) | [inline, static] |
Definition at line 203 of file HttpTransact.cc.
References HostDBInfo::app, HttpTransact::State::client_request_time, OverridableHttpConfigParams::down_server_timeout, HttpTransact::State::host_db_info, HostDBApplicationInfo::http_data, ink_assert, HostDBApplicationInfo::http_server_attr::last_failure, and HttpTransact::State::txn_conf.
Referenced by handle_response_from_server(), and HandleCacheOpenReadHit().
bool HttpTransact::is_stale_cache_response_returnable | ( | State * | s | ) | [static] |
Definition at line 5787 of file HttpTransact.cc.
References AUTHENTICATION_SUCCESS, AuthenticationNeeded(), HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_max_stale_age, HttpTransactHeaders::calculate_document_age(), HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, DebugTxn, HttpTransact::_CacheLookupInfo::directives, HttpTransact::_CacheDirectives::does_client_permit_lookup, MIMEHdr::get_cooked_cc_mask(), MIMEHdr::get_date(), HttpTransact::State::hdr_info, HTTPHdr::is_pragma_no_cache_set(), MIME_COOKED_MASK_CC_MUST_REVALIDATE, MIME_COOKED_MASK_CC_NEED_REVALIDATE_ONCE, MIME_COOKED_MASK_CC_NO_CACHE, MIME_COOKED_MASK_CC_NO_STORE, MIME_COOKED_MASK_CC_PROXY_REVALIDATE, HttpTransact::_CurrentInfo::now, HttpTransact::_CacheLookupInfo::object_read, HTTPInfo::request_sent_time_get(), HTTPInfo::response_get(), HTTPInfo::response_received_time_get(), and HttpTransact::State::txn_conf.
Referenced by handle_cache_operation_on_forward_server_response(), handle_server_connection_not_open(), and HandleCacheOpenReadHit().
void HttpTransact::issue_revalidate | ( | State * | s | ) | [static] |
Definition at line 2247 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, CACHE_AUTH_FRESH, OverridableHttpConfigParams::cache_ims_on_client_no_cache, HttpTransact::State::cache_info, OverridableHttpConfigParams::cache_when_to_revalidate, CACHE_WL_INIT, CACHE_WL_READ_RETRY, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::cop_test_page, DebugTxn, does_method_require_cache_copy_deletion(), DUMP_HEADER, find_appropriate_cached_resp(), MIMEHdr::get_last_modified(), GET_VIA_STRING, HttpTransact::State::hdr_info, HttpTransact::State::http_config_param, HTTP_LEN_HEAD, atscppapi::HTTP_METHOD_HEAD, HTTP_STATUS_GONE, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_MULTIPLE_CHOICES, HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, HTTP_STATUS_OK, HTTP_STATUS_PARTIAL_CONTENT, HTTP_VALUE_NO_CACHE, HTTP_WKSIDX_GET, HTTP_WKSIDX_HEAD, ink_assert, HTTPHdr::is_cache_control_set(), HTTPHdr::is_pragma_no_cache_set(), HttpTransact::State::method, HTTPHdr::method_get_wksidx(), HTTPHdr::method_set(), MIME_FIELD_ETAG, MIME_FIELD_IF_MODIFIED_SINCE, MIME_FIELD_IF_NONE_MATCH, MIME_FIELD_LAST_MODIFIED, MIME_LEN_ETAG, MIME_LEN_IF_MODIFIED_SINCE, MIME_LEN_IF_NONE_MATCH, MIME_LEN_LAST_MODIFIED, MIME_PRESENCE_ETAG, MIME_PRESENCE_IF_MODIFIED_SINCE, MIME_PRESENCE_IF_NONE_MATCH, MIMEHdr::presence(), RANGE_NONE, HttpTransact::State::range_setup, HttpTransact::_HeaderInfo::server_request, SET_VIA_STRING, HttpTransact::State::state_machine_id, HTTPHdr::status_get(), HttpTransact::State::txn_conf, MIMEHdr::value_get(), MIMEHdr::value_set(), VIA_CACHE_RESULT, VIA_DETAIL_CACHE_LOOKUP, VIA_IN_CACHE_STALE, HttpTransact::_CacheLookupInfo::write_lock_state, and HttpTransact::State::www_auth_content.
Referenced by HandleCacheOpenReadHit(), and PPDNSLookup().
void HttpTransact::LookupSkipOpenServer | ( | State * | s | ) | [static] |
Definition at line 2000 of file HttpTransact.cc.
References build_request(), HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, find_server_and_update_current_info(), HandleResponse(), HttpTransact::State::hdr_info, how_to_open_connection(), HttpTransact::ConnectionAttributes::http_version, ink_assert, HttpTransact::State::next_action, ORIGIN_SERVER, PARENT_PROXY, PPDNSLookup(), HttpTransact::_CurrentInfo::request_to, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, SM_ACTION_DNS_LOOKUP, SM_ACTION_ORIGIN_SERVER_OPEN, SM_ACTION_ORIGIN_SERVER_RAW_OPEN, and TRANSACT_RETURN.
Referenced by DecideCacheLookup(), and OSDNSLookup().
void HttpTransact::merge_and_update_headers_for_cache_update | ( | State * | s | ) | [static] |
Definition at line 4621 of file HttpTransact.cc.
References HttpTransact::State::api_modifiable_cached_resp, HttpTransact::State::cache_info, HttpTransact::_HeaderInfo::client_request, HTTPInfo::create(), HttpTransact::State::current, delete_warning_value(), MIMEHdr::get_age(), MIMEHdr::get_date(), HttpTransact::State::hdr_info, HTTP_LEN_GET, atscppapi::HTTP_METHOD_GET, HTTP_WARNING_CODE_REVALIDATION_FAILED, HTTP_WKSIDX_HEAD, ink_assert, max(), merge_response_header_with_cached_header(), MIME_FIELD_VIA, MIME_LEN_VIA, MIME_PRESENCE_AGE, HttpTransact::_CurrentInfo::now, HttpTransact::_CacheLookupInfo::object_read, HttpTransact::_CacheLookupInfo::object_store, HttpTransact::_CacheLookupInfo::original_url, HttpTransact::_RedirectInfo::original_url, MIMEHdr::presence(), HttpTransact::_RedirectInfo::redirect_in_process, HttpTransact::State::redirect_info, HTTPInfo::request_get(), HttpTransact::State::request_sent_time, HTTPInfo::request_set(), HTTPInfo::response_get(), HTTPInfo::response_set(), HttpTransact::_HeaderInfo::server_request, HttpTransact::_HeaderInfo::server_response, MIMEHdr::set_age(), MIMEHdr::set_date(), HTTPHdr::status_get(), HTTPHdr::url_get(), URL::valid(), and HTTPInfo::valid().
Referenced by handle_cache_operation_on_forward_server_response().
void HttpTransact::merge_response_header_with_cached_header | ( | HTTPHdr * | cached_header, | |
HTTPHdr * | response_header | |||
) | [static] |
Definition at line 4835 of file HttpTransact.cc.
References Debug, MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_delete(), MIMEHdr::field_value_set(), HttpTransactHeaders::is_this_a_hop_by_hop_header(), MIMEHdr::iter_get_first(), MIMEHdr::iter_get_next(), HdrHeapSDKHandle::m_heap, HdrHeap::m_lost_string_space, MIMEField::m_next_dup, merge_warning_header(), MIME_FIELD_CONTENT_LENGTH, MIME_FIELD_CONTENT_TYPE, MIME_FIELD_SET_COOKIE, MIME_FIELD_WARNING, MIMEField::name_get(), MIMEField::value_get(), and MIMEHdr::value_set().
Referenced by merge_and_update_headers_for_cache_update().
void HttpTransact::merge_warning_header | ( | HTTPHdr * | cached_header, | |
HTTPHdr * | response_header | |||
) | [static] |
Definition at line 4940 of file HttpTransact.cc.
References MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_delete(), MIMEHdr::field_find(), MIMEHdr::field_value_append(), MIMEHdr::field_value_set(), HdrCsvIter::get_first(), HdrCsvIter::get_next(), ink_atoi(), HdrHeapSDKHandle::m_heap, MIMEHdr::m_mime, MIMEField::m_next_dup, MIME_FIELD_WARNING, MIME_LEN_WARNING, MIMEField::name_set(), and MIMEField::value_get().
Referenced by merge_response_header_with_cached_header().
void HttpTransact::ModifyRequest | ( | State * | s | ) | [static] |
Definition at line 1130 of file HttpTransact.cc.
References OverridableHttpConfigParams::accept_encoding_filter_enabled, bootstrap_state_variables_from_request(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_req_is_server_style, HttpTransact::_HeaderInfo::client_request, DebugTxn, MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_delete(), MIMEHdr::field_find(), MIMEHdr::field_value_set(), MIMEHdr::get_max_forwards(), GZIP, handle_upgrade_request(), HttpTransact::State::hdr_info, HTTPHdr::host_get(), HTTP_WKSIDX_CONNECT, HTTPHdr::is_port_in_header(), HTTPHdr::is_target_in_url(), HTTPHdr::mark_target_dirty(), HttpTransactCache::match_gzip(), memcpy, HttpTransact::State::method, HTTPHdr::method_get_wksidx(), MIME_FIELD_ACCEPT_ENCODING, MIME_FIELD_HOST, MIME_LEN_ACCEPT_ENCODING, MIME_LEN_HOST, MIME_PRESENCE_MAX_FORWARDS, mimefield_value_equal(), OverridableHttpConfigParams::normalize_ae_gzip, HttpTransact::State::orig_scheme, perform_accept_encoding_filtering(), HttpTransact::ConnectionAttributes::port_attribute, URL::port_get_raw(), URL::port_set(), MIMEHdr::presence(), URL::scheme_get_wksidx(), URL::scheme_set(), SM_ACTION_API_READ_REQUEST_HDR, StartRemapRequest(), TRANSACT_RETURN, HttpProxyPort::TRANSPORT_SSL, HttpTransact::State::txn_conf, HTTPHdr::url_get(), URL_LEN_HTTP, URL_LEN_HTTPS, URL_SCHEME_HTTP, URL_SCHEME_HTTPS, URL_WKSIDX_HTTP, and URL_WKSIDX_HTTPS.
Referenced by HttpUpdateSM::handle_api_return(), and HttpSM::state_read_client_request_header().
bool HttpTransact::need_to_revalidate | ( | State * | s | ) | [static] |
Definition at line 2461 of file HttpTransact.cc.
References HttpTransact::State::api_update_cached_object, AUTHENTICATION_CACHE_AUTH, AUTHENTICATION_MUST_PROXY, AUTHENTICATION_MUST_REVALIDATE, AUTHENTICATION_SUCCESS, AuthenticationNeeded(), CACHE_AUTH_STALE, HttpTransact::State::cache_info, CACHE_LOOKUP_HIT_FRESH, CACHE_LOOKUP_HIT_STALE, CACHE_LOOKUP_HIT_WARNING, HttpTransact::State::cache_lookup_result, HttpTransact::_HeaderInfo::client_request, DebugTxn, HttpTransact::State::hdr_info, ink_assert, is_cache_response_returnable(), HttpTransact::_CacheLookupInfo::object_read, HttpTransact::_CacheLookupInfo::object_store, SET_VIA_STRING, HttpTransact::State::txn_conf, UPDATE_CACHED_OBJECT_CONTINUE, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_MISS_METHOD, and HttpTransact::State::www_auth_content.
Referenced by HandleCacheOpenReadHitFreshness().
void HttpTransact::origin_server_connection_speed | ( | State * | s, | |
ink_hrtime | transfer_time, | |||
int64_t | nbytes | |||
) | [static] |
Definition at line 8545 of file HttpTransact.cc.
References HRTIME_SECOND, HTTP_INCREMENT_TRANS_STAT, http_origin_server_speed_bytes_per_sec_100_stat, http_origin_server_speed_bytes_per_sec_100K_stat, http_origin_server_speed_bytes_per_sec_100M_stat, http_origin_server_speed_bytes_per_sec_10K_stat, http_origin_server_speed_bytes_per_sec_10M_stat, http_origin_server_speed_bytes_per_sec_1K_stat, and http_origin_server_speed_bytes_per_sec_1M_stat.
Referenced by update_size_and_time_stats().
void HttpTransact::OriginServerRawOpen | ( | State * | s | ) | [static] |
Definition at line 3198 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, build_response(), CACHE_DO_NO_ACTION, HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_response, CONGEST_CONTROL_CONGESTED_ON_F, CONGEST_CONTROL_CONGESTED_ON_M, CONNECTION_ALIVE, CONNECTION_CLOSED, CONNECTION_ERROR, HttpTransact::State::current, DebugTxn, handle_server_died(), HttpTransact::State::hdr_info, HTTP_STATUS_OK, HttpTransact::ConnectionAttributes::http_version, ink_assert, HttpTransact::State::next_action, OPEN_RAW_ERROR, HttpTransact::_CurrentInfo::state, and STATE_UNDEFINED.
Referenced by HttpSM::state_raw_http_server_open().
void HttpTransact::OSDNSLookup | ( | State * | s | ) | [static] |
Definition at line 1649 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::ConnectionAttributes::addr, ats_ip_addr_eq(), ats_ip_copy(), ats_ip_ntop(), HttpTransact::_DNSLookupInfo::attempts, build_error_response(), build_redirect_response(), CACHE_DO_NO_ACTION, HttpTransact::State::cache_info, CACHE_LOOKUP_HIT_FRESH, CACHE_LOOKUP_HIT_STALE, CACHE_LOOKUP_HIT_WARNING, CACHE_LOOKUP_MISS, HttpTransact::State::cache_lookup_result, CACHE_LOOKUP_SKIPPED, OverridableHttpConfigParams::cache_range_write, HttpTransact::State::cdn_remap_complete, HttpTransact::State::cdn_saved_next_action, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransactHeaders::convert_request(), HttpTransact::State::current, DebugTxn, HttpRequestData::dest_ip, DNS_ATTEMPTS_EXHAUSTED, HttpTransact::State::dns_info, HttpTransact::ConnectionAttributes::dns_round_robin, HttpConfigParams::enable_url_expandomatic, Log::error(), EXPANSION_FAILED, EXPANSION_NOT_ALLOWED, HttpTransact::State::force_dns, get_ka_info_from_host_db(), HandleCacheOpenReadHit(), HandleCacheOpenReadMiss(), HandleResponse(), HttpTransact::State::hdr_info, HttpTransact::State::host_db_info, ControlMatcher< Data, Result >::hostMatch, how_to_open_connection(), HttpTransact::State::http_config_param, HTTP_RELEASE_ASSERT, HTTP_STATUS_BAD_GATEWAY, HTTP_STATUS_INTERNAL_SERVER_ERROR, HttpTransact::ConnectionAttributes::http_version, ink_assert, HostDBInfo::ip, HttpTransact::_DNSLookupInfo::looking_up, HttpTransact::_DNSLookupInfo::lookup_name, HttpTransact::_DNSLookupInfo::lookup_success, LookupSkipOpenServer(), HTTPHdr::m_http, HTTPHdrImpl::m_version, MIME_PRESENCE_RANGE, HttpConfigParams::no_dns_forward_to_parent, HttpConfigParams::num_url_expansions, ORIGIN_SERVER, HttpTransact::_DNSLookupInfo::os_addr_style, HttpTransact::_DNSLookupInfo::OS_ADDR_TRY_HOSTDB, HttpTransact::_DNSLookupInfo::OS_ADDR_USE_CLIENT, HttpTransact::_DNSLookupInfo::OS_ADDR_USE_HOSTDB, HttpTransact::State::parent_params, ParentConfigParams::ParentTable, MIMEHdr::presence(), RANGE_NOT_HANDLED, RANGE_NOT_SATISFIABLE, HttpTransact::State::range_setup, HttpTransact::State::request_data, HttpTransact::State::request_will_not_selfloop, RETRY_EXPANDED_NAME, HostDBInfo::round_robin, HostDBInfo::rr(), IpEndpoint::sa, HostDBRoundRobin::select_next(), HttpTransact::_CurrentInfo::server, HttpTransact::State::server_info, HttpTransact::_HeaderInfo::server_request, SET_VIA_STRING, SM_ACTION_API_OS_DNS, SM_ACTION_DNS_LOOKUP, SM_ACTION_DNS_REVERSE_LOOKUP, SM_ACTION_INTERNAL_CACHE_NOOP, SM_ACTION_ORIGIN_SERVER_OPEN, SM_ACTION_ORIGIN_SERVER_RAW_OPEN, SM_ACTION_SEND_ERROR_CACHE_NOOP, StartAccessControl(), TRANSACT_RETURN, try_to_expand_host_name(), HttpTransact::State::txn_conf, VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_NO_FORWARD, and will_this_request_self_loop().
Referenced by build_response_from_cache(), CallOSDNSLookup(), handle_response_from_server(), HandleCacheOpenRead(), HandleCacheOpenReadHit(), and HandleRequest().
bool HttpTransact::perform_accept_encoding_filtering | ( | State * | s | ) | [static] |
Definition at line 673 of file HttpTransact.cc.
References HttpTransact::_HeaderInfo::client_request, DebugTxn, MIMEHdr::field_attach(), MIMEHdr::field_create(), MIMEHdr::field_find(), MIMEHdr::field_value_set(), HttpTransact::State::hdr_info, HTTP_LEN_IDENTITY, HTTP_VALUE_IDENTITY, ink_error(), memcpy, MIME_FIELD_ACCEPT_ENCODING, MIME_FIELD_USER_AGENT, MIME_LEN_ACCEPT_ENCODING, MIME_LEN_USER_AGENT, HttpUserAgent_RegxEntry::next, HttpUserAgent_RegxEntry::regx, HttpUserAgent_RegxEntry::regx_valid, HttpUserAgent_RegxEntry::STRTYPE_REGEXP, HttpUserAgent_RegxEntry::STRTYPE_SUBSTR_CASE, HttpUserAgent_RegxEntry::STRTYPE_SUBSTR_NCASE, HttpUserAgent_RegxEntry::stype, HttpConfig::user_agent_list, HttpUserAgent_RegxEntry::user_agent_str, HttpUserAgent_RegxEntry::user_agent_str_size, and MIMEField::value_get().
Referenced by ModifyRequest().
void HttpTransact::PerformRemap | ( | State * | s | ) | [static] |
Definition at line 829 of file HttpTransact.cc.
References DebugTxn, EndRemapRequest(), SM_ACTION_REMAP_REQUEST, and TRANSACT_RETURN.
Referenced by StartRemapRequest().
void HttpTransact::PPDNSLookup | ( | State * | s | ) | [static] |
Definition at line 1521 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, ats_ip_copy(), ats_ip_ntop(), ats_is_ip(), HttpTransact::_DNSLookupInfo::attempts, build_request(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, DebugTxn, HttpTransact::State::dns_info, HttpTransact::ConnectionAttributes::dns_round_robin, find_server_and_update_current_info(), get_ka_info_from_host_db(), handle_parent_died(), HttpTransact::State::hdr_info, HttpTransact::State::host_db_info, HOST_NONE, how_to_open_connection(), HttpTransact::ConnectionAttributes::http_version, ink_assert, HostDBInfo::ip, issue_revalidate(), HttpTransact::_DNSLookupInfo::looking_up, HttpTransact::_DNSLookupInfo::lookup_success, HttpTransact::State::next_action, HttpTransact::State::parent_info, PARENT_PROXY, HttpTransact::State::pending_work, HttpTransact::_CurrentInfo::request_to, HostDBInfo::round_robin, IpEndpoint::sa, HttpTransact::_CurrentInfo::server, HttpTransact::_HeaderInfo::server_request, SM_ACTION_DNS_LOOKUP, HttpSM::sm_id, HttpTransact::State::state_machine, TRANSACT_RETURN, and HTTPHdr::valid().
Referenced by handle_response_from_icp_suggested_host(), handle_response_from_parent(), HandleCacheOpenReadHit(), HandleCacheOpenReadMiss(), HandleICPLookup(), and LookupSkipOpenServer().
void HttpTransact::process_quick_http_filter | ( | State * | s, | |
int | method | |||
) | [static] |
Definition at line 6455 of file HttpTransact.cc.
References AclRecord::_method_mask, HttpClientSession::acl_record, HttpTransact::ConnectionAttributes::addr, AclRecord::ALL_METHOD_MASK, ats_ip_ntop(), HttpTransact::State::client_connection_enabled, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, Debug, HttpTransact::State::hdr_info, hdrtoken_index_to_wks(), is_debug_tag_set, AclRecord::isMethodAllowed(), AclRecord::isNonstandardMethodAllowed(), HTTPHdr::method_get(), IpEndpoint::sa, HttpTransact::State::state_machine, and HttpSM::ua_session.
Referenced by EndRemapRequest().
void HttpTransact::ReDNSRoundRobin | ( | State * | s | ) | [static] |
Definition at line 1587 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HttpTransact::ConnectionAttributes::addr, ats_ip_copy(), ats_ip_ntop(), build_error_response(), HttpTransact::State::cache_info, HttpTransact::ConnectionAttributes::clear_connect_fail(), HttpTransact::State::client_info, HttpTransact::State::current, DebugTxn, HttpRequestData::dest_ip, HttpTransact::State::dns_info, HttpTransact::ConnectionAttributes::dns_round_robin, get_ka_info_from_host_db(), HttpTransact::ConnectionAttributes::had_connect_fail(), HttpTransact::State::host_db_info, how_to_open_connection(), HTTP_STATUS_BAD_GATEWAY, ink_assert, HostDBInfo::ip, HttpTransact::_DNSLookupInfo::lookup_success, HttpTransact::State::next_action, HttpTransact::State::request_data, HostDBInfo::round_robin, IpEndpoint::sa, HttpTransact::_CurrentInfo::server, and HttpTransact::State::server_info.
Referenced by delete_server_rr_entry().
static void HttpTransact::RemapRequest | ( | State * | s | ) | [static] |
void HttpTransact::retry_server_connection_not_open | ( | State * | s, | |
ServerState_t | conn_state, | |||
int | max_retries | |||
) | [static] |
Definition at line 3737 of file HttpTransact.cc.
References ACTIVE_TIMEOUT, HttpTransact::ConnectionAttributes::addr, HttpTransact::State::arena, ats_ip_ntop(), HttpTransact::_CurrentInfo::attempts, HttpTransact::_HeaderInfo::client_request, CONNECTION_ALIVE, HttpTransact::State::current, DebugTxn, Log::error(), HttpDebugNames::get_server_state_name(), HttpTransact::ConnectionAttributes::had_connect_fail(), HttpTransact::State::hdr_info, ink_assert, HttpTransact::ConnectionAttributes::keep_alive, IpEndpoint::sa, HttpTransact::_CurrentInfo::server, HttpTransact::_CurrentInfo::state, Arena::str_free(), and HTTPHdr::url_string_get().
Referenced by handle_response_from_server().
bool HttpTransact::service_transaction_in_proxy_only_mode | ( | State * | s | ) | [static] |
Definition at line 6449 of file HttpTransact.cc.
Referenced by DecideCacheLookup().
Definition at line 4755 of file HttpTransact.cc.
References HttpTransact::State::cop_test_page, HTTPHdr::copy(), HTTPHdr::create(), DUMP_HEADER, MIMEHdr::field_delete(), HttpTransact::State::hdr_info, HTTP_TYPE_RESPONSE, MIME_FIELD_CONTENT_LENGTH, MIME_LEN_CONTENT_LENGTH, HttpTransact::State::state_machine_id, and HttpTransact::_HeaderInfo::transform_response.
Referenced by build_response_from_cache(), handle_cache_operation_on_forward_server_response(), and handle_no_cache_operation_on_forward_server_response().
void HttpTransact::set_headers_for_cache_write | ( | State * | s, | |
HTTPInfo * | cache_info, | |||
HTTPHdr * | request, | |||
HTTPHdr * | response | |||
) | [static] |
Definition at line 4770 of file HttpTransact.cc.
References HttpTransact::State::api_server_request_body_set, OverridableHttpConfigParams::cache_ignore_auth, HttpTransact::State::cache_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::cop_test_page, HTTPInfo::create(), DUMP_HEADER, HttpTransact::State::hdr_info, HTTP_LEN_GET, atscppapi::HTTP_METHOD_GET, ink_assert, MIME_FIELD_RANGE, MIME_FIELD_SET_COOKIE, MIME_FIELD_VIA, MIME_FIELD_WWW_AUTHENTICATE, MIME_LEN_RANGE, MIME_LEN_SET_COOKIE, MIME_LEN_VIA, MIME_LEN_WWW_AUTHENTICATE, HttpTransact::State::negative_caching, HttpTransact::_CacheLookupInfo::original_url, HttpTransact::_RedirectInfo::original_url, HttpTransact::_RedirectInfo::redirect_in_process, HttpTransact::State::redirect_info, HTTPInfo::request_get(), HTTPInfo::request_set(), HTTPInfo::response_get(), HTTPInfo::response_set(), HttpTransact::State::state_machine_id, HttpTransact::State::txn_conf, HTTPHdr::type_get(), HTTPHdr::url_get(), HTTPHdr::url_set(), URL::valid(), and HTTPInfo::valid().
Referenced by handle_cache_operation_on_forward_server_response(), handle_transform_ready(), and HandlePushCacheWrite().
static void HttpTransact::SetCacheFreshnessLimit | ( | State * | s | ) | [static] |
static bool HttpTransact::setup_auth_lookup | ( | State * | s | ) | [static] |
void HttpTransact::setup_plugin_request_intercept | ( | State * | s | ) | [static] |
Definition at line 1416 of file HttpTransact.cc.
References HttpTransact::_CacheLookupInfo::action, HostDBInfo::app, build_request(), CACHE_DO_NO_ACTION, HttpTransact::State::cache_info, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, MIMEHdr::field_delete(), HttpTransact::State::hdr_info, HttpTransact::State::host_db_info, HostDBApplicationInfo::http_data, HTTP_INCREMENT_TRANS_STAT, http_tunnels_stat, HostDBApplicationInfo::http_server_attr::http_version, HttpTransact::ConnectionAttributes::http_version, ink_assert, HttpTransact::ConnectionAttributes::keep_alive, MIME_FIELD_CONNECTION, MIME_LEN_CONNECTION, HttpTransact::_CurrentInfo::mode, HttpTransact::State::next_hop_scheme, ORIGIN_SERVER, HostDBApplicationInfo::http_server_attr::pipeline_max, HttpSM::plugin_tunnel, HttpTransact::State::scheme, HttpTransact::State::server_info, HttpTransact::_HeaderInfo::server_request, HTTPVersion::set(), SM_ACTION_ORIGIN_SERVER_OPEN, HttpTransact::State::state_machine, TRANSACT_RETURN, update_current_info(), and URL_WKSIDX_HTTP.
Referenced by HandleRequest().
void HttpTransact::StartAccessControl | ( | State * | s | ) | [static] |
Definition at line 1832 of file HttpTransact.cc.
References HandleRequestAuthorized().
Referenced by HandleRequest(), and OSDNSLookup().
static void HttpTransact::StartAuth | ( | State * | s | ) | [static] |
void HttpTransact::StartRemapRequest | ( | State * | s | ) | [static] |
Check for URL remappings before checking request validity or initializing state variables since the remappings can insert or change the destination host, port and protocol.
Definition at line 757 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, HttpTransact::State::api_skip_all_remapping, ats_ip4_addr_cast(), HttpConfigParams::autoconf_localhost_only, HttpConfigParams::autoconf_port, HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, HttpTransact::State::cop_test_page, Debug, DebugTxn, HttpTransact::State::filter_mask, HandleRequest(), HttpTransact::State::hdr_info, URL::host_get(), HttpTransact::State::http_config_param, HTTP_WKSIDX_GET, is_debug_tag_set, HttpTransact::State::is_upgrade_request, local_host_ip_str, HTTPHdr::m_http, HttpTransact::State::method, obj_describe(), HttpTransact::State::orig_scheme, URL::path_get(), PerformRemap(), URL::port_get(), HttpTransact::State::post_remap_upgrade_return_point, ptr_len_cmp(), HttpConfigParams::referer_filter_enabled, HttpConfigParams::referer_format_redirect, IpEndpoint::sa, SM_ACTION_API_PRE_REMAP, SM_ACTION_POST_REMAP_SKIP, TRANSACT_RETURN, HTTPHdr::url_get(), URL_REMAP_ALL, URL_REMAP_DEFAULT, url_remap_mode, and URL_WKSIDX_HTTP.
Referenced by handle_websocket_upgrade_pre_remap(), and ModifyRequest().
HttpTransact::HostNameExpansionError_t HttpTransact::try_to_expand_host_name | ( | State * | s | ) | [static] |
Definition at line 6485 of file HttpTransact.cc.
References HttpTransact::State::arena, HttpTransact::_DNSLookupInfo::attempts, DNS_ATTEMPTS_EXHAUSTED, HttpTransact::State::dns_info, HttpConfigParams::enable_url_expandomatic, EXPANSION_FAILED, HttpTransact::State::http_config_param, HTTP_RELEASE_ASSERT, ink_assert, ink_string_concatenate_strings_n(), HttpTransact::_DNSLookupInfo::looking_up, HttpTransact::_DNSLookupInfo::lookup_name, HttpTransact::_DNSLookupInfo::lookup_success, HttpTransact::ConnectionAttributes::name, HttpConfigParams::num_url_expansions, ORIGIN_SERVER, PARENT_PROXY, RETRY_EXPANDED_NAME, HttpTransact::State::server_info, Arena::str_alloc(), ParseRules::strchr(), and HttpConfigParams::url_expansions.
Referenced by OSDNSLookup().
void HttpTransact::update_size_and_time_stats | ( | State * | s, | |
ink_hrtime | total_time, | |||
ink_hrtime | user_agent_write_time, | |||
ink_hrtime | origin_server_read_time, | |||
int | user_agent_request_header_size, | |||
int64_t | user_agent_request_body_size, | |||
int | user_agent_response_header_size, | |||
int64_t | user_agent_response_body_size, | |||
int | origin_server_request_header_size, | |||
int64_t | origin_server_request_body_size, | |||
int | origin_server_response_header_size, | |||
int64_t | origin_server_response_body_size, | |||
int | pushed_response_header_size, | |||
int64_t | pushed_response_body_size | |||
) | [static] |
Definition at line 8570 of file HttpTransact.cc.
References HttpSM::background_fill, BACKGROUND_FILL_ABORTED, BACKGROUND_FILL_COMPLETED, BACKGROUND_FILL_NONE, BACKGROUND_FILL_STARTED, HttpTransact::State::current, histogram_request_document_size(), histogram_response_document_size(), http_background_fill_bytes_aborted_stat, http_background_fill_bytes_completed_stat, http_err_client_abort_count_stat, http_err_client_abort_origin_server_bytes_stat, http_err_client_abort_user_agent_bytes_stat, http_err_connect_fail_count_stat, http_err_connect_fail_origin_server_bytes_stat, http_err_connect_fail_user_agent_bytes_stat, HTTP_INCREMENT_TRANS_STAT, http_misc_count_stat, http_misc_origin_server_bytes_stat, http_misc_user_agent_bytes_stat, http_origin_server_request_document_total_size_stat, http_origin_server_request_header_total_size_stat, http_origin_server_response_document_total_size_stat, http_origin_server_response_header_total_size_stat, http_parent_proxy_request_total_bytes_stat, http_parent_proxy_response_total_bytes_stat, http_parent_proxy_transaction_time_stat, http_pushed_document_total_size_stat, http_pushed_response_header_total_size_stat, HTTP_SUM_TRANS_STAT, http_tcp_client_refresh_count_stat, http_tcp_client_refresh_origin_server_bytes_stat, http_tcp_client_refresh_user_agent_bytes_stat, http_tcp_expired_miss_count_stat, http_tcp_expired_miss_origin_server_bytes_stat, http_tcp_expired_miss_user_agent_bytes_stat, http_tcp_hit_count_stat, http_tcp_hit_origin_server_bytes_stat, http_tcp_hit_user_agent_bytes_stat, http_tcp_ims_hit_count_stat, http_tcp_ims_hit_origin_server_bytes_stat, http_tcp_ims_hit_user_agent_bytes_stat, http_tcp_ims_miss_count_stat, http_tcp_ims_miss_origin_server_bytes_stat, http_tcp_ims_miss_user_agent_bytes_stat, http_tcp_miss_count_stat, http_tcp_miss_origin_server_bytes_stat, http_tcp_miss_user_agent_bytes_stat, http_tcp_refresh_hit_count_stat, http_tcp_refresh_hit_origin_server_bytes_stat, http_tcp_refresh_hit_user_agent_bytes_stat, http_tcp_refresh_miss_count_stat, http_tcp_refresh_miss_origin_server_bytes_stat, http_tcp_refresh_miss_user_agent_bytes_stat, http_total_transactions_time_stat, http_user_agent_request_document_total_size_stat, http_user_agent_request_header_total_size_stat, http_user_agent_response_document_total_size_stat, http_user_agent_response_header_total_size_stat, HTTP_WKSIDX_PUSH, ink_assert, HttpTransact::_SquidLogInfo::log_code, max(), HttpTransact::State::method, origin_server_connection_speed(), PARENT_PROXY, HttpTransact::_CurrentInfo::request_to, HttpTransact::State::squid_codes, SQUID_LOG_ERR_CLIENT_ABORT, SQUID_LOG_ERR_CONNECT_FAIL, SQUID_LOG_TCP_CLIENT_REFRESH, SQUID_LOG_TCP_EXPIRED_MISS, SQUID_LOG_TCP_HIT, SQUID_LOG_TCP_IMS_HIT, SQUID_LOG_TCP_IMS_MISS, SQUID_LOG_TCP_MEM_HIT, SQUID_LOG_TCP_MISS, SQUID_LOG_TCP_REFRESH_HIT, SQUID_LOG_TCP_REFRESH_MISS, HttpTransact::State::state_machine, and user_agent_connection_speed().
Referenced by HttpSM::update_stats().
void HttpTransact::update_stat | ( | State * | s, | |
int | stat, | |||
ink_statval_t | increment | |||
) | [inline, static] |
Definition at line 1414 of file HttpTransact.h.
References add_new_stat_block(), HttpTransact::State::current_stats, HttpTransact::StatRecord_t::increment, HttpTransact::StatRecord_t::index, HttpTransact::StatBlock::next_insert, StatBlockEntries, and HttpTransact::StatBlock::stats.
bool HttpTransact::url_looks_dynamic | ( | URL * | url | ) | [static] |
Definition at line 5837 of file HttpTransact.cc.
References ParseRules::ink_tolower(), URL::params_get(), URL::path_get(), URL::query_get(), URL::scheme_get_wksidx(), URL_WKSIDX_HTTP, and URL_WKSIDX_HTTPS.
Referenced by is_request_cache_lookupable().
void HttpTransact::user_agent_connection_speed | ( | State * | s, | |
ink_hrtime | transfer_time, | |||
int64_t | nbytes | |||
) | [static] |
Definition at line 8315 of file HttpTransact.cc.
References HRTIME_SECOND, HTTP_INCREMENT_TRANS_STAT, http_user_agent_speed_bytes_per_sec_100_stat, http_user_agent_speed_bytes_per_sec_100K_stat, http_user_agent_speed_bytes_per_sec_100M_stat, http_user_agent_speed_bytes_per_sec_10K_stat, http_user_agent_speed_bytes_per_sec_10M_stat, http_user_agent_speed_bytes_per_sec_1K_stat, and http_user_agent_speed_bytes_per_sec_1M_stat.
Referenced by update_size_and_time_stats().
HttpTransact::Freshness_t HttpTransact::what_is_document_freshness | ( | State * | s, | |
HTTPHdr * | client_request, | |||
HTTPHdr * | cached_obj_response | |||
) | [static] |
Definition at line 7234 of file HttpTransact.cc.
References HttpTransact::State::cache_control, OverridableHttpConfigParams::cache_when_to_revalidate, HttpTransactHeaders::calculate_document_age(), calculate_document_freshness_limit(), calculate_freshness_fuzz(), HttpTransact::_HeaderInfo::client_request, HttpTransact::State::current, DebugTxn, FRESHNESS_FRESH, OverridableHttpConfigParams::freshness_fuzz_time, FRESHNESS_STALE, FRESHNESS_WARNING, MIMEHdr::get_cooked_cc_mask(), MIMEHdr::get_cooked_cc_max_age(), MIMEHdr::get_cooked_cc_max_stale(), MIMEHdr::get_cooked_cc_min_fresh(), MIMEHdr::get_date(), HttpTransact::State::hdr_info, CacheControlResult::ignore_client_cc_max_age, ink_assert, max(), MIME_COOKED_MASK_CC_MAX_AGE, MIME_COOKED_MASK_CC_MAX_STALE, MIME_COOKED_MASK_CC_MIN_FRESH, MIME_COOKED_MASK_CC_MUST_REVALIDATE, MIME_PRESENCE_IF_MODIFIED_SINCE, min(), HttpTransact::_CurrentInfo::now, NUM_SECONDS_IN_ONE_YEAR, MIMEHdr::presence(), HttpTransact::State::request_sent_time, HttpTransact::State::response_received_time, CacheControlResult::revalidate_after, URL::scheme_get_wksidx(), CacheControlResult::ttl_in_cache, HttpTransact::State::txn_conf, HTTPHdr::url_get(), and URL_WKSIDX_HTTP.
Referenced by HandleCacheOpenReadHitFreshness().
bool HttpTransact::will_this_request_self_loop | ( | State * | s | ) | [static] |
Definition at line 6543 of file HttpTransact.cc.
References HttpTransact::ConnectionAttributes::addr, ats_ip_addr_eq(), ats_ip_port_host_order(), ats_is_ip(), build_error_response(), HttpTransact::State::client_info, HttpTransact::_HeaderInfo::client_request, DebugTxn, HttpTransact::State::dns_info, MIMEHdr::field_find(), HttpTransact::State::hdr_info, HttpTransact::State::host_db_info, HttpTransact::State::http_config_param, HTTP_STATUS_BAD_REQUEST, Machine::instance(), HostDBInfo::ip, HttpTransact::_DNSLookupInfo::looking_up, HttpTransact::_DNSLookupInfo::lookup_success, MIMEField::m_next_dup, MIME_FIELD_VIA, MIME_LEN_VIA, ORIGIN_SERVER, PARENT_PROXY, URL::port_get(), HttpConfigParams::proxy_hostname, HttpConfigParams::proxy_request_via_string, ptr_len_str(), HttpTransact::State::request_will_not_selfloop, HTTPHdr::url_get(), and MIMEField::value_get().
Referenced by OSDNSLookup().