#include <HTTP.h>
Inherits MIMEHdr.
Public Member Functions | |
HTTPHdr () | |
~HTTPHdr () | |
int | valid () const |
void | create (HTTPType polarity, HdrHeap *heap=NULL) |
void | clear () |
void | reset () |
void | copy (const HTTPHdr *hdr) |
void | copy_shallow (const HTTPHdr *hdr) |
int | unmarshal (char *buf, int len, RefCountObj *block_ref) |
int | print (char *buf, int bufsize, int *bufindex, int *dumpoffset) |
int | length_get () |
HTTPType | type_get () const |
HTTPVersion | version_get () |
void | version_set (HTTPVersion version) |
const char * | method_get (int *length) |
int | method_get_wksidx () |
void | method_set (const char *value, int length) |
URL * | url_create (URL *url) |
URL * | url_get () const |
URL * | url_get (URL *url) |
char * | url_string_get (Arena *arena=0, int *length=0) |
Get a string with the effective URL in it. | |
char * | url_string_get_ref (int *length=0) |
Get a string with the effective URL in it. | |
int | url_print (char *buff, int length, int *offset, int *skip) |
Print the URL. | |
char const * | path_get (int *length) |
Get the URL path. | |
char const * | host_get (int *length=0) |
Get the target host name. | |
int | port_get () |
Get the target port. | |
char const * | scheme_get (int *length) |
Get the URL scheme. | |
void | url_set (URL *url) |
void | url_set_as_server_url (URL *url) |
void | url_set (const char *str, int length) |
bool | is_target_in_url () const |
Check location of target host. | |
bool | is_port_in_header () const |
Check if a port was specified in the target. | |
void | set_url_target_from_host_field (URL *url=0) |
If the target is in the fields and not the URL, copy it to the url. | |
void | mark_target_dirty () const |
Mark the target cache as invalid. | |
HTTPStatus | status_get () |
void | status_set (HTTPStatus status) |
const char * | reason_get (int *length) |
void | reason_set (const char *value, int length) |
MIMEParseResult | parse_req (HTTPParser *parser, const char **start, const char *end, bool eof) |
MIMEParseResult | parse_resp (HTTPParser *parser, const char **start, const char *end, bool eof) |
MIMEParseResult | parse_req (HTTPParser *parser, IOBufferReader *r, int *bytes_used, bool eof) |
MIMEParseResult | parse_resp (HTTPParser *parser, IOBufferReader *r, int *bytes_used, bool eof) |
bool | is_cache_control_set (const char *cc_directive_wks) |
bool | is_pragma_no_cache_set () |
Data Fields | |
HTTPHdrImpl * | m_http |
URL | m_url_cached |
MIMEField * | m_host_mime |
int | m_host_length |
Length of hostname. | |
int | m_port |
Target port. | |
bool | m_target_cached |
Whether host name and port are cached. | |
bool | m_target_in_url |
Whether host name and port are in the URL. | |
bool | m_port_in_header |
Set if the port was effectively specified in the header. | |
Protected Member Functions | |
void | _fill_target_cache () const |
Load the target cache. | |
void | _test_and_fill_target_cache () const |
Test the cache and fill it if necessary. | |
Static Protected Attributes | |
static Arena *const | USE_HDR_HEAP_MAGIC = reinterpret_cast<Arena*>(1) |
Friends | |
class | UrlPrintHack |
Definition at line 513 of file HTTP.h.
void HTTPHdr::_fill_target_cache | ( | ) | const [protected] |
Load the target cache.
Definition at line 1461 of file HTTP.cc.
References MIMEHdr::get_host_port_values(), URL::host_get(), is_digit(), m_host_length, m_host_mime, m_port, m_port_in_header, m_target_cached, m_target_in_url, URL::m_url_impl, URLImpl::m_url_type, URL::port_get(), URL::port_get_raw(), url_canonicalize_port(), and url_get().
Referenced by _test_and_fill_target_cache().
void HTTPHdr::_test_and_fill_target_cache | ( | ) | const [inline, protected] |
Test the cache and fill it if necessary.
Definition at line 914 of file HTTP.h.
References _fill_target_cache(), and m_target_cached.
Referenced by host_get(), is_port_in_header(), is_target_in_url(), port_get(), and set_url_target_from_host_field().
void HTTPHdr::clear | ( | void | ) | [inline] |
Reimplemented from HdrHeapSDKHandle.
Definition at line 837 of file HTTP.h.
References URL::clear(), HTTP_TYPE_REQUEST, m_http, MIMEHdr::m_mime, HTTPHdrImpl::m_polarity, and m_url_cached.
Referenced by HttpTransactCache::calculate_quality_of_match(), HttpTransact::EndRemapRequest(), getClusterCacheLocal(), and unmarshal().
void HTTPHdr::copy | ( | const HTTPHdr * | hdr | ) | [inline] |
Definition at line 861 of file HTTP.h.
References http_hdr_clone(), http_hdr_copy_onto(), ink_assert, HTTPHdrImpl::m_fields_impl, HdrHeapSDKHandle::m_heap, m_http, MIMEHdr::m_mime, new_HdrHeap(), and valid().
Referenced by HTTPCacheAlt::copy(), HttpTransactHeaders::copy_header_fields(), HttpTransact::HandlePushResponseHdr(), PrefetchBlaster::init(), HTTPInfo::request_set(), HTTPInfo::response_set(), and HttpTransact::set_header_for_transform().
void HTTPHdr::copy_shallow | ( | const HTTPHdr * | hdr | ) | [inline] |
Definition at line 878 of file HTTP.h.
References URL::copy_shallow(), HTTP_TYPE_REQUEST, ink_assert, HdrHeapSDKHandle::m_heap, m_http, MIMEHdr::m_mime, m_url_cached, type_get(), URL::valid(), and valid().
Referenced by HttpTransactCache::calculate_quality_of_match(), HTTPInfo::request_get(), and HTTPInfo::response_get().
Definition at line 824 of file HTTP.h.
References http_hdr_create(), HTTPHdrImpl::m_fields_impl, HdrHeapSDKHandle::m_heap, m_http, MIMEHdr::m_mime, and new_HdrHeap().
Referenced by br(), HttpTransactHeaders::build_base_response(), UpdateEntry::BuildHttpRequest(), getClusterCacheLocal(), HttpTransact::HandleBlindTunnel(), HttpTransact::HandlePushResponseHdr(), FetchSM::init_comm(), HttpTransact::set_header_for_transform(), ICPProcessor::start(), and TSHttpHdrCreate().
char const * HTTPHdr::host_get | ( | int * | length = 0 |
) | [inline] |
Get the target host name.
The length is returned in length if non-NULL.
Definition at line 922 of file HTTP.h.
References _test_and_fill_target_cache(), URL::host_get(), m_host_length, m_host_mime, MIMEField::m_ptr_value, m_target_in_url, and url_get().
Referenced by HttpTransact::check_request_validity(), HttpTransact::EndRemapRequest(), HttpTransact::initialize_state_variables_for_origin_server(), HttpTransact::initialize_state_variables_from_request(), LogAccessHttp::marshal_server_host_name(), HttpTransact::ModifyRequest(), set_url_target_from_host_field(), and RemapProcessor::setup_for_remap().
bool HTTPHdr::is_cache_control_set | ( | const char * | cc_directive_wks | ) | [inline] |
Definition at line 1236 of file HTTP.h.
References HdrTokenTypeSpecific::cache_control, MIMEHdr::get_cooked_cc_mask(), hdrtoken_is_wks(), HDRTOKEN_TYPE_CACHE_CONTROL, hdrtoken_wks_to_prefix(), ink_assert, HdrTokenTypeSpecific::u, valid(), HdrTokenHeapPrefix::wks_token_type, and HdrTokenHeapPrefix::wks_type_specific.
Referenced by HttpTransact::AuthenticationNeeded(), do_cookies_prevent_caching(), HttpTransact::does_client_request_permit_cached_response(), HttpTransact::does_client_request_permit_dns_caching(), HttpTransact::does_client_request_permit_storing(), HttpTransact::HandleCacheOpenReadHit(), HttpTransact::HandleCacheOpenReadMiss(), and HttpTransact::issue_revalidate().
bool HTTPHdr::is_port_in_header | ( | ) | const [inline] |
Check if a port was specified in the target.
true
if the port was part of the target. Definition at line 960 of file HTTP.h.
References _test_and_fill_target_cache(), and m_port_in_header.
Referenced by HttpTransact::ModifyRequest().
bool HTTPHdr::is_pragma_no_cache_set | ( | ) | [inline] |
Definition at line 1255 of file HTTP.h.
References MIMEHdr::get_cooked_pragma_no_cache(), ink_assert, and valid().
Referenced by HttpTransactHeaders::convert_to_1_0_request_header(), HttpTransact::does_client_request_permit_cached_response(), HttpTransact::does_client_request_permit_dns_caching(), HttpTransact::HandleCacheOpenReadHit(), HttpTransact::HandleCacheOpenReadMiss(), HttpTransact::is_stale_cache_response_returnable(), and HttpTransact::issue_revalidate().
bool HTTPHdr::is_target_in_url | ( | ) | const [inline] |
Check location of target host.
true
if the host was in the URL, false
otherwise. false
if the host is missing. Definition at line 950 of file HTTP.h.
References _test_and_fill_target_cache(), and m_target_in_url.
Referenced by HttpTransact::build_request(), HttpTransact::EndRemapRequest(), HttpTransact::ModifyRequest(), and RemapProcessor::setup_for_remap().
int HTTPHdr::length_get | ( | ) | [inline] |
Reimplemented from MIMEHdr.
Definition at line 904 of file HTTP.h.
References http_hdr_length_get(), ink_assert, m_http, and valid().
Referenced by comp_http_hdr(), HttpSM::dump_state_hdr(), HttpTransact::handle_trace_and_options_requests(), LogAccessHttp::marshal_client_req_header_len(), LogAccessHttp::marshal_proxy_req_header_len(), LogAccessHttp::marshal_server_resp_header_len(), and TSHttpHdrLengthGet().
void HTTPHdr::mark_target_dirty | ( | ) | const [inline] |
Mark the target cache as invalid.
Definition at line 970 of file HTTP.h.
References m_target_cached.
Referenced by RemapProcessor::finish_remap(), HttpTransact::ModifyRequest(), RemapProcessor::setup_for_remap(), TSHttpTxnClientReqGet(), and url_get().
const char * HTTPHdr::method_get | ( | int * | length | ) | [inline] |
Definition at line 1026 of file HTTP.h.
References http_hdr_method_get(), HTTP_TYPE_REQUEST, ink_assert, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by LogAccessHttp::marshal_client_req_http_method(), HttpTransact::process_quick_http_filter(), and TSHttpHdrMethodGet().
int HTTPHdr::method_get_wksidx | ( | ) | [inline] |
Definition at line 1036 of file HTTP.h.
References HTTP_TYPE_REQUEST, ink_assert, m_http, HTTPHdrImpl::m_polarity, HTTPHdrImpl::req, HTTPHdrImpl::u, and valid().
Referenced by HttpTransact::AuthenticationNeeded(), HttpTransactCache::calculate_quality_of_match(), HttpTransact::check_request_validity(), HttpTransactHeaders::convert_to_0_9_request_header(), HttpTransactHeaders::downgrade_request(), HttpTransact::EndRemapRequest(), HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::handle_internal_request(), HttpTransact::handle_request_keep_alive_headers(), HttpTransact::initialize_state_variables_from_request(), is_request_conditional(), HttpTransact::is_response_cacheable(), HttpTransact::issue_revalidate(), and HttpTransact::ModifyRequest().
void HTTPHdr::method_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 1049 of file HTTP.h.
References hdrtoken_tokenize(), http_hdr_method_set(), HTTP_TYPE_REQUEST, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by HttpTransact::HandleBlindTunnel(), HttpTransact::HandlePushResponseHdr(), PrefetchBlaster::init(), HttpTransact::issue_revalidate(), and TSHttpHdrMethodSet().
MIMEParseResult HTTPHdr::parse_req | ( | HTTPParser * | parser, | |
const char ** | start, | |||
const char * | end, | |||
bool | eof | |||
) | [inline] |
Definition at line 1212 of file HTTP.h.
References http_parser_parse_req(), HTTP_TYPE_REQUEST, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by UpdateEntry::BuildHttpRequest(), request_to_data(), and TSHttpHdrParseReq().
MIMEParseResult HTTPHdr::parse_req | ( | HTTPParser * | parser, | |
IOBufferReader * | r, | |||
int * | bytes_used, | |||
bool | eof | |||
) |
Definition at line 48 of file HdrTSOnly.cc.
References HdrHeap::attach_block(), IOBufferReader::block_read_avail(), IOBufferReader::consume(), IOBufferReader::get_current_block(), http_parser_parse_req(), HTTP_TYPE_REQUEST, ink_assert, HdrHeap::lock_ronly_str_heap(), HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, PARSE_CONT, HdrHeap::set_ronly_str_heap_end(), IOBufferReader::start(), start, HdrHeap::unlock_ronly_str_heap(), and valid().
MIMEParseResult HTTPHdr::parse_resp | ( | HTTPParser * | parser, | |
const char ** | start, | |||
const char * | end, | |||
bool | eof | |||
) | [inline] |
Definition at line 1224 of file HTTP.h.
References http_parser_parse_resp(), HTTP_TYPE_RESPONSE, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by FetchSM::process_fetch_read(), and TSHttpHdrParseResp().
MIMEParseResult HTTPHdr::parse_resp | ( | HTTPParser * | parser, | |
IOBufferReader * | r, | |||
int * | bytes_used, | |||
bool | eof | |||
) |
Definition at line 90 of file HdrTSOnly.cc.
References HdrHeap::attach_block(), IOBufferReader::block_read_avail(), IOBufferReader::consume(), IOBufferReader::get_current_block(), http_parser_parse_resp(), HTTP_TYPE_RESPONSE, ink_assert, HdrHeap::lock_ronly_str_heap(), HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, PARSE_CONT, HdrHeap::set_ronly_str_heap_end(), IOBufferReader::start(), start, HdrHeap::unlock_ronly_str_heap(), and valid().
char const * HTTPHdr::path_get | ( | int * | length | ) | [inline] |
Get the URL path.
This is a reference, not allocated.
NULL
if there is no valid URL. length | Storage for path length. |
Definition at line 1268 of file HTTP.h.
References URL::path_get(), and url_get().
Referenced by LogAccessHttp::init().
int HTTPHdr::port_get | ( | ) | [inline] |
Get the target port.
If the target port is not found then it is adjusted to the default port for the URL type.
Definition at line 940 of file HTTP.h.
References _test_and_fill_target_cache(), and m_port.
Referenced by HttpTransact::initialize_state_variables_for_origin_server(), HttpTransact::initialize_state_variables_from_request(), and RemapProcessor::setup_for_remap().
int HTTPHdr::print | ( | char * | buf, | |
int | bufsize, | |||
int * | bufindex, | |||
int * | dumpoffset | |||
) | [inline] |
Reimplemented from MIMEHdr.
Definition at line 894 of file HTTP.h.
References http_hdr_print(), ink_assert, HdrHeapSDKHandle::m_heap, m_http, and valid().
Referenced by comp_http_hdr(), copy_header(), HttpSM::dump_state_hdr(), HttpTransact::handle_trace_and_options_requests(), ShowCache::handleCacheEvent(), print_hdr(), CoreUtils::print_http_hdr(), HttpTransactCache::SelectFromAlternates(), TSHttpHdrPrint(), and HttpSM::write_header_into_buffer().
const char * HTTPHdr::reason_get | ( | int * | length | ) | [inline] |
Definition at line 1188 of file HTTP.h.
References http_hdr_reason_get(), HTTP_TYPE_RESPONSE, ink_assert, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by HttpTransactHeaders::generate_and_set_squid_codes(), and TSHttpHdrReasonGet().
void HTTPHdr::reason_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 1200 of file HTTP.h.
References http_hdr_reason_set(), HTTP_TYPE_RESPONSE, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by HttpTransactHeaders::build_base_response(), RangeTransform::change_response_header(), HttpTransact::change_response_header_because_of_range_request(), and TSHttpHdrReasonSet().
void HTTPHdr::reset | ( | ) | [inline] |
Definition at line 849 of file HTTP.h.
References HdrHeapSDKHandle::m_heap, m_http, MIMEHdr::m_mime, m_url_cached, and URL::reset().
char const * HTTPHdr::scheme_get | ( | int * | length | ) | [inline] |
Get the URL scheme.
This is a reference, not allocated.
NULL
if there is no valid URL. length | Storage for path length. |
Definition at line 1275 of file HTTP.h.
References URL::scheme_get(), and url_get().
Referenced by LogAccessHttp::marshal_client_req_url_scheme().
void HTTPHdr::set_url_target_from_host_field | ( | URL * | url = 0 |
) |
If the target is in the fields and not the URL, copy it to the url.
If url is NULL
the cached URL in this header is used.
NULL
the copy is always performed. Definition at line 1489 of file HTTP.cc.
References _test_and_fill_target_cache(), host_get(), URL::host_set(), m_host_length, m_host_mime, m_port, m_port_in_header, MIMEField::m_ptr_value, m_target_in_url, m_url_cached, and URL::port_set().
Referenced by HttpTransact::build_request(), HttpTransact::DecideCacheLookup(), and RemapProcessor::setup_for_remap().
HTTPStatus HTTPHdr::status_get | ( | ) | [inline] |
Definition at line 1164 of file HTTP.h.
References http_hdr_status_get(), HTTP_STATUS_NONE, HTTP_TYPE_RESPONSE, ink_assert, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by HttpTransact::build_response(), HttpTransact::check_response_validity(), HttpTransact::client_result_stat(), HttpTransactHeaders::convert_to_1_1_response_header(), HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::handle_content_length_header(), HttpTransact::handle_forward_server_connection_open(), HttpTransact::handle_no_cache_operation_on_forward_server_response(), HttpTransact::handle_response_keep_alive_headers(), HttpTransact::initialize_state_variables_from_response(), HttpTransact::is_response_cacheable(), HttpTransact::issue_revalidate(), LogAccessHttp::marshal_cache_resp_status_code(), LogAccessHttp::marshal_proxy_resp_status_code(), LogAccessHttp::marshal_server_resp_status_code(), HttpTransactCache::match_response_to_request_conditionals(), HttpTransact::merge_and_update_headers_for_cache_update(), PrefetchTransform::redirect(), and TSHttpHdrStatusGet().
void HTTPHdr::status_set | ( | HTTPStatus | status | ) | [inline] |
Definition at line 1176 of file HTTP.h.
References http_hdr_status_set(), HTTP_TYPE_RESPONSE, ink_assert, m_http, HTTPHdrImpl::m_polarity, and valid().
Referenced by HttpTransactHeaders::build_base_response(), RangeTransform::change_response_header(), HttpTransact::change_response_header_because_of_range_request(), and TSHttpHdrStatusSet().
HTTPType HTTPHdr::type_get | ( | ) | const [inline] |
Definition at line 987 of file HTTP.h.
References http_hdr_type_get(), ink_assert, m_http, and valid().
Referenced by HttpTransactHeaders::build_base_response(), HttpTransact::check_response_validity(), copy_shallow(), do_cookies_prevent_caching(), HttpTransact::handle_content_length_header(), HttpTransact::handle_internal_request(), HttpTransact::handle_request_keep_alive_headers(), HttpTransact::handle_response_keep_alive_headers(), HttpTransact::handle_trace_and_options_requests(), HttpTransact::set_headers_for_cache_write(), and TSHttpHdrTypeGet().
int HTTPHdr::unmarshal | ( | char * | buf, | |
int | len, | |||
RefCountObj * | block_ref | |||
) |
Definition at line 1631 of file HTTP.cc.
References clear(), HDR_HEAP_OBJ_HTTP_HEADER, HdrHeapSDKHandle::m_heap, m_http, MIMEHdr::m_mime, and HdrHeap::unmarshal().
Definition at line 1062 of file HTTP.h.
References URL::create(), HTTP_TYPE_REQUEST, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, HdrHeapSDKHandle::set(), and valid().
Referenced by HttpTransact::HandleBlindTunnel().
Definition at line 1098 of file HTTP.h.
References HTTP_TYPE_REQUEST, ink_assert, m_http, HTTPHdrImpl::m_polarity, URL::m_url_impl, HTTPHdrImpl::req, HdrHeapSDKHandle::set(), HTTPHdrImpl::u, and valid().
URL * HTTPHdr::url_get | ( | ) | const [inline] |
Definition at line 1076 of file HTTP.h.
References HTTP_TYPE_REQUEST, ink_assert, m_http, HTTPHdrImpl::m_polarity, m_url_cached, URL::m_url_impl, mark_target_dirty(), HTTPHdrImpl::req, HdrHeapSDKHandle::set(), HTTPHdrImpl::u, and valid().
Referenced by _fill_target_cache(), HttpTransact::build_redirect_response(), HttpTransact::build_request(), HttpTransact::check_request_validity(), HttpTransactHeaders::convert_to_0_9_request_header(), HttpTransactHeaders::convert_to_1_0_request_header(), HttpTransactHeaders::convert_to_1_1_request_header(), HttpTransact::DecideCacheLookup(), RemapProcessor::finish_remap(), StatPagesManager::handle_http(), HttpTransact::handle_internal_request(), HttpTransact::handle_websocket_upgrade_pre_remap(), HttpTransact::HandleBlindTunnel(), PrefetchBlaster::handleCookieHeaders(), PrefetchBlaster::handleEvent(), host_get(), HttpPagesHandler::HttpPagesHandler(), PrefetchBlaster::init(), HttpTransact::initialize_state_variables_from_request(), HttpTransact::is_request_cache_lookupable(), HttpTransact::is_request_valid(), HttpTransact::merge_and_update_headers_for_cache_update(), HttpTransact::ModifyRequest(), path_get(), RemapProcessor::perform_remap(), PrefetchTransform::PrefetchTransform(), PrefetchTransform::redirect(), HttpSM::redirect_request(), register_ShowCache(), register_ShowCacheInternal(), register_ShowHostDB(), register_ShowNet(), UrlRewrite::Remap_redirect(), HttpTransactHeaders::remove_host_name_from_url(), HTTPInfo::request_url_get(), scheme_get(), HttpTransact::set_headers_for_cache_write(), RemapProcessor::setup_for_remap(), ShowCache::ShowCache(), HttpTransact::StartRemapRequest(), stat_callback(), HttpTransact::what_is_document_freshness(), and HttpTransact::will_this_request_self_loop().
int HTTPHdr::url_print | ( | char * | buff, | |
int | length, | |||
int * | offset, | |||
int * | skip | |||
) |
Print the URL.
Output is not null terminated.
buff | Output buffer | |
length | Length of buffer | |
[in,out] | offset | ??? |
[in,out] | skip | ??? |
Definition at line 1611 of file HTTP.cc.
References ink_release_assert, m_url_cached, and URL::print().
void HTTPHdr::url_set | ( | const char * | str, | |
int | length | |||
) | [inline] |
Definition at line 1138 of file HTTP.h.
References HTTP_TYPE_REQUEST, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, HTTPHdrImpl::req, HTTPHdrImpl::u, url_clear(), url_parse(), and valid().
void HTTPHdr::url_set | ( | URL * | url | ) | [inline] |
Definition at line 1112 of file HTTP.h.
References HTTP_TYPE_REQUEST, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, URL::m_url_impl, HTTPHdrImpl::req, HTTPHdrImpl::u, url_copy_onto(), and valid().
Referenced by getClusterCacheLocal(), HttpTransact::HandleBlindTunnel(), PARENTSELECTION(), and HttpTransact::set_headers_for_cache_write().
void HTTPHdr::url_set_as_server_url | ( | URL * | url | ) | [inline] |
Definition at line 1125 of file HTTP.h.
References HTTP_TYPE_REQUEST, ink_assert, HdrHeapSDKHandle::m_heap, m_http, HTTPHdrImpl::m_polarity, URL::m_url_impl, HTTPHdrImpl::req, HTTPHdrImpl::u, url_copy_onto_as_server_url(), and valid().
char * HTTPHdr::url_string_get | ( | Arena * | arena = 0 , |
|
int * | length = 0 | |||
) |
Get a string with the effective URL in it.
If length is not NULL
then the length of the string is stored in the int pointed to by length.
Note that this can be different from getting the URL
and invoking URL::string_get
if the host is in a header field and not explicitly in the URL.
Definition at line 1592 of file HTTP.cc.
References m_url_cached, URL::string_get(), URL::string_get_ref(), and USE_HDR_HEAP_MAGIC.
Referenced by HttpTransact::build_error_response(), HttpRequestData::get_string(), HttpTransact::retry_server_connection_not_open(), and url_string_get_ref().
char * HTTPHdr::url_string_get_ref | ( | int * | length = 0 |
) | [inline] |
Get a string with the effective URL in it.
This is automatically allocated if needed in the request heap.
length | Store string length here. |
Definition at line 1262 of file HTTP.h.
References url_string_get(), and USE_HDR_HEAP_MAGIC.
Referenced by LogAccessHttp::init().
int HTTPHdr::valid | ( | ) | const [inline] |
Reimplemented from MIMEHdr.
Definition at line 815 of file HTTP.h.
References HdrHeapSDKHandle::m_heap, m_http, and MIMEHdr::m_mime.
Referenced by HttpTransactHeaders::build_base_response(), HttpTransact::build_error_response(), copy(), HTTPCacheAlt::copy(), HttpTransactHeaders::copy_header_fields(), copy_shallow(), dump_hdr(), HttpSM::dump_state_hdr(), find_appropriate_cached_resp(), HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::handle_response_from_parent(), HttpTransact::handle_response_keep_alive_headers(), HttpTransact::handle_transform_ready(), HttpTransact::HandleApiErrorJump(), PrefetchBlaster::handleCookieHeaders(), HttpTransact::HandleICPLookup(), HttpTransact::HandleRequest(), LogAccessHttp::init(), is_cache_control_set(), is_pragma_no_cache_set(), length_get(), HTTPInfo::marshal(), HTTPInfo::marshal_length(), LogAccessHttp::marshal_proxy_resp_status_code(), method_get(), method_get_wksidx(), method_set(), parse_req(), parse_resp(), HttpTransact::PPDNSLookup(), PrefetchPlugin(), print(), reason_get(), reason_set(), PrefetchTransform::redirect(), HttpTransactCache::SelectFromAlternates(), ICPProcessor::start(), status_get(), status_set(), TSFetchPageRespGet(), TSHttpTxnCachedReqGet(), TSHttpTxnCachedRespGet(), TSHttpTxnCachedRespModifiableGet(), TSHttpTxnClientReqGet(), TSHttpTxnClientRespGet(), TSHttpTxnIsCacheable(), TSHttpTxnPristineUrlGet(), TSHttpTxnServerReqGet(), TSHttpTxnServerRespGet(), TSHttpTxnServerRespIgnore(), TSHttpTxnTransformRespGet(), TSHttpTxnUpdateCachedObject(), TSICPCachedReqGet(), TSICPCachedRespGet(), type_get(), url_create(), url_get(), url_set(), url_set_as_server_url(), version_get(), version_set(), and UpdateEntry::~UpdateEntry().
HTTPVersion HTTPHdr::version_get | ( | ) | [inline] |
Definition at line 1006 of file HTTP.h.
References http_hdr_version_get(), ink_assert, m_http, and valid().
Referenced by HttpTransact::bootstrap_state_variables_from_request(), HttpTransact::check_request_validity(), HttpTransactHeaders::convert_to_1_1_request_header(), HttpTransact::did_forward_server_send_0_9_response(), HttpTransactHeaders::downgrade_request(), HttpTransact::get_ka_info_from_host_db(), HttpTransact::handle_100_continue_response(), HttpTransact::handle_forward_server_connection_open(), HttpTransact::handle_upgrade_request(), HttpTransact::initialize_state_variables_from_response(), HttpTransactHeaders::insert_via_header_in_request(), HttpTransactHeaders::insert_via_header_in_response(), LogAccessHttp::marshal_cache_resp_http_version(), LogAccessHttp::marshal_client_req_http_version(), LogAccessHttp::marshal_proxy_resp_status_code(), LogAccessHttp::marshal_server_resp_http_version(), and TSHttpHdrVersionGet().
void HTTPHdr::version_set | ( | HTTPVersion | version | ) | [inline] |
Definition at line 1016 of file HTTP.h.
References http_hdr_version_set(), ink_assert, m_http, HTTPVersion::m_version, and valid().
Referenced by HttpTransactHeaders::build_base_response(), HttpTransact::build_request(), HttpTransactHeaders::convert_to_0_9_request_header(), HttpTransactHeaders::convert_to_1_0_request_header(), HttpTransactHeaders::convert_to_1_0_response_header(), HttpTransactHeaders::convert_to_1_1_response_header(), HttpTransact::HandleBlindTunnel(), and TSHttpHdrVersionSet().
friend class UrlPrintHack [friend] |
int HTTPHdr::m_host_length [mutable] |
Length of hostname.
Definition at line 520 of file HTTP.h.
Referenced by _fill_target_cache(), host_get(), and set_url_target_from_host_field().
MIMEField* HTTPHdr::m_host_mime [mutable] |
Definition at line 519 of file HTTP.h.
Referenced by _fill_target_cache(), host_get(), and set_url_target_from_host_field().
Definition at line 516 of file HTTP.h.
Referenced by check_n_attach_prefetch_transform(), clear(), copy(), copy_shallow(), create(), HttpTransact::EndRemapRequest(), HttpTransact::HandleRequest(), PrefetchBlaster::invokeBlaster(), length_get(), CoreUtils::load_http_hdr(), method_get(), method_get_wksidx(), method_set(), HttpTransact::OSDNSLookup(), parse_req(), parse_resp(), print(), CoreUtils::print_http_hdr(), reason_get(), reason_set(), reset(), FetchSM::resp_hdr_mloc(), RemapPlugins::run_plugin(), HttpTransact::StartRemapRequest(), status_get(), status_set(), TSFetchPageRespGet(), TSHttpAltInfoCachedReqGet(), TSHttpAltInfoCachedRespGet(), TSHttpAltInfoClientReqGet(), TSHttpHdrCreate(), TSHttpHdrLengthGet(), TSHttpHdrParseReq(), TSHttpHdrParseResp(), TSHttpHdrPrint(), TSHttpHdrStatusSet(), TSHttpHdrTypeSet(), TSHttpHdrVersionSet(), TSHttpTxnCachedReqGet(), TSHttpTxnCachedRespGet(), TSHttpTxnCachedRespModifiableGet(), TSHttpTxnClientReqGet(), TSHttpTxnClientRespGet(), TSHttpTxnServerReqGet(), TSHttpTxnServerRespGet(), TSHttpTxnTransformRespGet(), TSICPCachedReqGet(), TSICPCachedRespGet(), type_get(), HTTPInfo::unmarshal(), unmarshal(), url_create(), url_get(), url_set(), url_set_as_server_url(), valid(), version_get(), and version_set().
int HTTPHdr::m_port [mutable] |
Target port.
Definition at line 521 of file HTTP.h.
Referenced by _fill_target_cache(), port_get(), and set_url_target_from_host_field().
bool HTTPHdr::m_port_in_header [mutable] |
Set if the port was effectively specified in the header.
true
if the target (in the URL or the HOST field) also specified a port. That is, true
if whatever source had the target host also had a port, false
otherwise.
Definition at line 528 of file HTTP.h.
Referenced by _fill_target_cache(), is_port_in_header(), and set_url_target_from_host_field().
bool HTTPHdr::m_target_cached [mutable] |
Whether host name and port are cached.
Definition at line 522 of file HTTP.h.
Referenced by _fill_target_cache(), _test_and_fill_target_cache(), and mark_target_dirty().
bool HTTPHdr::m_target_in_url [mutable] |
Whether host name and port are in the URL.
Definition at line 523 of file HTTP.h.
Referenced by _fill_target_cache(), host_get(), is_target_in_url(), and set_url_target_from_host_field().
URL HTTPHdr::m_url_cached [mutable] |
Definition at line 518 of file HTTP.h.
Referenced by clear(), copy_shallow(), reset(), set_url_target_from_host_field(), HTTPInfo::unmarshal(), url_get(), url_print(), and url_string_get().
Arena *const HTTPHdr::USE_HDR_HEAP_MAGIC = reinterpret_cast<Arena*>(1) [static, protected] |
Definition at line 675 of file HTTP.h.
Referenced by url_string_get(), and url_string_get_ref().