#include <URL.h>
Inherits HdrHeapSDKHandle.
Public Member Functions | |
URL () | |
~URL () | |
int | valid () const |
void | create (HdrHeap *h) |
void | copy (const URL *url) |
void | copy_shallow (const URL *url) |
void | clear () |
void | reset () |
void | nuke_proxy_stuff () |
int | print (char *buf, int bufsize, int *bufindex, int *dumpoffset) |
int | length_get () |
void | clear_string_ref () |
char * | string_get (Arena *arena, int *length=NULL) |
char * | string_get_ref (int *length=NULL) |
char * | string_get_buf (char *dstbuf, int dsbuf_size, int *length=NULL) |
void | hash_get (CryptoHash *md5) |
void | host_hash_get (CryptoHash *md5) |
const char * | scheme_get (int *length) |
int | scheme_get_wksidx () |
void | scheme_set (const char *value, int length) |
const char * | user_get (int *length) |
void | user_set (const char *value, int length) |
const char * | password_get (int *length) |
void | password_set (const char *value, int length) |
const char * | host_get (int *length) |
void | host_set (const char *value, int length) |
int | port_get () |
int | port_get_raw () |
void | port_set (int port) |
const char * | path_get (int *length) |
void | path_set (const char *value, int length) |
int | type_get () |
void | type_set (int type) |
const char * | params_get (int *length) |
void | params_set (const char *value, int length) |
const char * | query_get (int *length) |
void | query_set (const char *value, int length) |
const char * | fragment_get (int *length) |
void | fragment_set (const char *value, int length) |
MIMEParseResult | parse (const char **start, const char *end) |
Parser doesn't clear URL first, so if you parse over a non-clear URL, the resulting URL may contain some of the previous data. | |
MIMEParseResult | parse (const char *str, int length) |
Parser doesn't clear URL first, so if you parse over a non-clear URL, the resulting URL may contain some of the previous data. | |
MIMEParseResult | parse_no_path_component_breakdown (const char *str, int length) |
Parser doesn't clear URL first, so if you parse over a non-clear URL, the resulting URL may contain some of the previous data. | |
Static Public Member Functions | |
static char * | unescapify (Arena *arena, const char *str, int length) |
Data Fields | |
URLImpl * | m_url_impl |
Definition at line 257 of file URL.h.
void URL::clear | ( | void | ) | [inline] |
Reimplemented from HdrHeapSDKHandle.
Definition at line 393 of file URL.h.
References m_url_impl.
Referenced by HTTPHdr::clear(), UrlMappingContainer::deleteToURL(), HttpTransact::State::destroy(), and ICPPeerReadCont::PeerReadData::init().
void URL::clear_string_ref | ( | ) | [inline] |
Definition at line 453 of file URL.h.
References ink_assert, m_url_impl, url_clear_string_ref(), and valid().
void URL::copy | ( | const URL * | url | ) | [inline] |
Definition at line 372 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_copy_onto(), and valid().
Referenced by HttpTransact::build_request(), HttpTransact::DecideCacheLookup(), HttpSM::do_cache_prepare_action(), HttpSM::do_remap_request(), HttpSM::redirect_request(), remap_parse_config_bti(), UrlRewrite::Remap_redirect(), TSHttpTxnCacheLookupUrlGet(), TSHttpTxnNewCacheLookupDo(), and TSHttpTxnRedirectRequest().
void URL::copy_shallow | ( | const URL * | url | ) | [inline] |
Definition at line 382 of file URL.h.
References ink_assert, m_url_impl, and valid().
Referenced by HTTPHdr::copy_shallow().
void URL::create | ( | HdrHeap * | h | ) | [inline] |
Definition at line 357 of file URL.h.
References HdrHeapSDKHandle::m_heap, m_url_impl, new_HdrHeap(), and url_create().
Referenced by UrlMappingContainer::createNewToURL(), HttpTransact::DecideCacheLookup(), ShowCache::delete_url(), HttpSM::do_remap_request(), ICPPeerReadCont::ICPPeerQueryCont(), ShowCache::lookup_url(), HttpSM::redirect_request(), remap_parse_config_bti(), UrlRewrite::Remap_redirect(), UrlRewrite::ReverseMap(), UrlRewrite::SetupBackdoorMapping(), UrlRewrite::SetupPacMapping(), TSHttpTxnNewCacheLookupDo(), TSHttpTxnRedirectRequest(), HTTPHdr::url_create(), and UpdateEntry::ValidURL().
const char * URL::fragment_get | ( | int * | length | ) | [inline] |
Definition at line 698 of file URL.h.
References ink_assert, URLImpl::m_len_fragment, URLImpl::m_ptr_fragment, m_url_impl, and valid().
Referenced by TSUrlHttpFragmentGet().
void URL::fragment_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 709 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_fragment_set(), and valid().
Referenced by TSUrlHttpFragmentSet().
void URL::hash_get | ( | CryptoHash * | md5 | ) | [inline] |
Definition at line 473 of file URL.h.
References ink_assert, m_url_impl, url_MD5_get(), and valid().
Referenced by ShowCache::lookup_url(), RecursiveHttpGet::RecursiveHttpGetEvent(), and TSHttpTxnNewCacheLookupDo().
const char * URL::host_get | ( | int * | length | ) | [inline] |
Definition at line 564 of file URL.h.
References ink_assert, URLImpl::m_len_host, URLImpl::m_ptr_host, m_url_impl, and valid().
Referenced by HTTPHdr::_fill_target_cache(), HttpTransact::build_redirect_response(), HttpTransact::build_request(), ShowCache::delete_url(), RemapProcessor::finish_remap(), StatPagesManager::handle_http(), HttpTransact::HandleBlindTunnel(), PrefetchBlaster::handleCookieHeaders(), HTTPHdr::host_get(), how_to_open_connection(), PrefetchBlaster::init(), StatPagesManager::is_cache_inspector_page(), StatPagesManager::is_stat_page(), ShowCache::lookup_url(), PrefetchTransform::PrefetchTransform(), process_regex_mapping_config(), RecursiveHttpGet::RecursiveHttpGetEvent(), HttpSM::redirect_request(), remap_parse_config_bti(), UrlRewrite::Remap_redirect(), UrlRewrite::ReverseMap(), RemapPlugins::run_plugin(), HttpTransact::StartRemapRequest(), TSUrlHostGet(), and url_rewrite_remap_request().
void URL::host_hash_get | ( | CryptoHash * | md5 | ) | [inline] |
Definition at line 483 of file URL.h.
References ink_assert, m_url_impl, url_host_MD5_get(), and valid().
void URL::host_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 575 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_host_set(), and valid().
Referenced by HttpTransact::build_redirect_response(), HttpTransact::DecideCacheLookup(), HttpTransact::HandleBlindTunnel(), remap_parse_config_bti(), HTTPHdr::set_url_target_from_host_field(), TSUrlHostSet(), and url_rewrite_remap_request().
int URL::length_get | ( | ) | [inline] |
Definition at line 429 of file URL.h.
References ink_assert, m_url_impl, url_length_get(), and valid().
void URL::nuke_proxy_stuff | ( | ) | [inline] |
Definition at line 409 of file URL.h.
References ink_assert, m_url_impl, url_nuke_proxy_stuff(), and valid().
Referenced by HttpTransactHeaders::remove_host_name_from_url().
const char * URL::params_get | ( | int * | length | ) | [inline] |
Definition at line 656 of file URL.h.
References ink_assert, URLImpl::m_len_params, URLImpl::m_ptr_params, m_url_impl, and valid().
Referenced by TSUrlHttpParamsGet(), and HttpTransact::url_looks_dynamic().
void URL::params_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 667 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_params_set(), and valid().
Referenced by TSUrlHttpParamsSet().
MIMEParseResult URL::parse | ( | const char * | str, | |
int | length | |||
) | [inline] |
MIMEParseResult URL::parse | ( | const char ** | start, | |
const char * | end | |||
) | [inline] |
Parser doesn't clear URL first, so if you parse over a non-clear URL, the resulting URL may contain some of the previous data.
Definition at line 721 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_parse(), and valid().
Referenced by ShowCache::delete_url(), ICPPeerReadCont::ICPPeerQueryCont(), PrefetchBlaster::init(), ShowCache::lookup_url(), parse(), HttpSM::redirect_request(), UrlRewrite::ReverseMap(), UrlRewrite::SetupBackdoorMapping(), UrlRewrite::SetupPacMapping(), TSUrlParse(), and UpdateEntry::ValidURL().
MIMEParseResult URL::parse_no_path_component_breakdown | ( | const char * | str, | |
int | length | |||
) | [inline] |
Parser doesn't clear URL first, so if you parse over a non-clear URL, the resulting URL may contain some of the previous data.
Definition at line 747 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_parse_no_path_component_breakdown(), and valid().
Referenced by remap_parse_config_bti().
const char * URL::password_get | ( | int * | length | ) | [inline] |
Definition at line 543 of file URL.h.
References ink_assert, URLImpl::m_len_password, URLImpl::m_ptr_password, m_url_impl, and valid().
Referenced by TSUrlPasswordGet().
void URL::password_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 554 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_password_set(), and valid().
Referenced by TSUrlPasswordSet().
const char * URL::path_get | ( | int * | length | ) | [inline] |
Definition at line 615 of file URL.h.
References ink_assert, URLImpl::m_len_path, URLImpl::m_ptr_path, m_url_impl, and valid().
Referenced by PrefetchBlaster::handleCookieHeaders(), HttpPagesHandler::HttpPagesHandler(), UrlMappingPathIndex::Insert(), HTTPHdr::path_get(), register_ShowCache(), register_ShowCacheInternal(), register_ShowHostDB(), register_ShowNet(), RemapPlugins::run_plugin(), UrlMappingPathIndex::Search(), SetHomePageRedirectFlag(), HttpTransact::StartRemapRequest(), stat_callback(), TSUrlPathGet(), HttpTransact::url_looks_dynamic(), and url_rewrite_remap_request().
void URL::path_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 626 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_path_set(), and valid().
Referenced by TSUrlPathSet(), and url_rewrite_remap_request().
int URL::port_get | ( | ) | [inline] |
Definition at line 585 of file URL.h.
References ink_assert, URLImpl::m_port, m_url_impl, URLImpl::m_url_type, url_canonicalize_port(), and valid().
Referenced by HTTPHdr::_fill_target_cache(), HttpTransact::build_request(), HttpTransact::check_request_validity(), HttpTransact::HandleBlindTunnel(), how_to_open_connection(), HttpTransact::is_request_valid(), HttpSM::redirect_request(), UrlRewrite::Remap_redirect(), UrlRewrite::ReverseMap(), RemapPlugins::run_plugin(), HttpTransact::StartRemapRequest(), TSUrlPortGet(), and HttpTransact::will_this_request_self_loop().
int URL::port_get_raw | ( | ) | [inline] |
Definition at line 595 of file URL.h.
References ink_assert, URLImpl::m_port, m_url_impl, and valid().
Referenced by HTTPHdr::_fill_target_cache(), RemapProcessor::finish_remap(), HttpTransact::ModifyRequest(), and url_rewrite_remap_request().
void URL::port_set | ( | int | port | ) | [inline] |
Definition at line 605 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_port_set(), and valid().
Referenced by HttpTransact::DecideCacheLookup(), HttpTransact::HandleBlindTunnel(), HttpTransact::ModifyRequest(), HTTPHdr::set_url_target_from_host_field(), UrlRewrite::SetupPacMapping(), TSUrlPortSet(), and url_rewrite_remap_request().
int URL::print | ( | char * | buf, | |
int | bufsize, | |||
int * | bufindex, | |||
int * | dumpoffset | |||
) | [inline] |
Definition at line 419 of file URL.h.
References ink_assert, m_url_impl, url_print(), and valid().
Referenced by TSUrlPrint(), and HTTPHdr::url_print().
const char * URL::query_get | ( | int * | length | ) | [inline] |
Definition at line 677 of file URL.h.
References ink_assert, URLImpl::m_len_query, URLImpl::m_ptr_query, m_url_impl, and valid().
Referenced by HttpPagesHandler::HttpPagesHandler(), register_ShowHostDB(), register_ShowNet(), ShowCache::ShowCache(), TSUrlHttpQueryGet(), and HttpTransact::url_looks_dynamic().
void URL::query_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 688 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_query_set(), and valid().
Referenced by TSUrlHttpQuerySet().
void URL::reset | ( | ) | [inline] |
const char * URL::scheme_get | ( | int * | length | ) | [inline] |
Definition at line 493 of file URL.h.
References ink_assert, m_url_impl, url_scheme_get(), and valid().
Referenced by UpdateSM::HandleSMEvent(), UpdateEntry::Init(), PrefetchBlaster::init(), HttpSM::redirect_request(), remap_parse_config_bti(), RemapPlugins::run_plugin(), HTTPHdr::scheme_get(), TSUrlSchemeGet(), and url_rewrite_remap_request().
int URL::scheme_get_wksidx | ( | ) | [inline] |
Definition at line 501 of file URL.h.
References ink_assert, URLImpl::m_scheme_wks_idx, m_url_impl, and valid().
Referenced by HttpTransact::check_request_validity(), find_server_and_update_current_info(), HttpTransact::handle_internal_request(), HttpTransact::handle_websocket_upgrade_pre_remap(), HttpTransact::initialize_state_variables_from_request(), HttpTransact::ModifyRequest(), HttpSM::redirect_request(), HttpTransact::url_looks_dynamic(), and HttpTransact::what_is_document_freshness().
void URL::scheme_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 511 of file URL.h.
References hdrtoken_tokenize(), ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_scheme_set(), and valid().
Referenced by HttpTransact::handle_websocket_upgrade_pre_remap(), HttpTransact::HandleBlindTunnel(), HttpTransact::ModifyRequest(), HttpSM::redirect_request(), remap_parse_config_bti(), UrlRewrite::SetupBackdoorMapping(), TSUrlSchemeSet(), and url_rewrite_remap_request().
char * URL::string_get | ( | Arena * | arena, | |
int * | length = NULL | |||
) | [inline] |
Definition at line 439 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_string_get(), and valid().
Referenced by HttpTransact::build_redirect_response(), HttpSM::do_cache_lookup_and_read(), HttpSM::do_cache_prepare_action(), HttpBodyFactory::fabricate_with_old_api(), HttpPagesHandler::handle_smlist(), HttpTransact::handleIfRedirect(), PrefetchBlaster::init(), PrefetchTransform::PrefetchTransform(), PrefetchTransform::redirect(), remap_load_plugin(), RemapPlugins::run_plugin(), and HTTPHdr::url_string_get().
char * URL::string_get_buf | ( | char * | dstbuf, | |
int | dsbuf_size, | |||
int * | length = NULL | |||
) | [inline] |
Definition at line 463 of file URL.h.
References ink_assert, m_url_impl, url_string_get_buf(), and valid().
Referenced by RemapProcessor::finish_remap(), and url_mapping::Print().
char * URL::string_get_ref | ( | int * | length = NULL |
) | [inline] |
Definition at line 446 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_string_get_ref(), and valid().
Referenced by RemapProcessor::finish_remap(), UrlRewrite::ReverseMap(), and HTTPHdr::url_string_get().
int URL::type_get | ( | ) | [inline] |
Definition at line 636 of file URL.h.
References ink_assert, URLImpl::m_type_code, m_url_impl, and valid().
Referenced by TSUrlFtpTypeGet().
void URL::type_set | ( | int | type | ) | [inline] |
Definition at line 646 of file URL.h.
References ink_assert, m_url_impl, url_type_set(), and valid().
Referenced by TSUrlFtpTypeSet().
char * URL::unescapify | ( | Arena * | arena, | |
const char * | str, | |||
int | length | |||
) | [inline, static] |
Definition at line 760 of file URL.h.
References url_unescapify().
const char * URL::user_get | ( | int * | length | ) | [inline] |
Definition at line 522 of file URL.h.
References ink_assert, URLImpl::m_len_user, URLImpl::m_ptr_user, m_url_impl, and valid().
Referenced by TSUrlUserGet().
void URL::user_set | ( | const char * | value, | |
int | length | |||
) | [inline] |
Definition at line 533 of file URL.h.
References ink_assert, HdrHeapSDKHandle::m_heap, m_url_impl, url_user_set(), and valid().
Referenced by TSUrlUserSet().
int URL::valid | ( | ) | const [inline] |
Definition at line 348 of file URL.h.
References HdrHeapSDKHandle::m_heap, and m_url_impl.
Referenced by HttpTransact::build_request(), clear_string_ref(), HttpTransactHeaders::convert_to_0_9_request_header(), HttpTransactHeaders::convert_to_1_0_request_header(), HttpTransactHeaders::convert_to_1_1_request_header(), copy(), copy_shallow(), HTTPHdr::copy_shallow(), HttpTransact::DecideCacheLookup(), HttpSM::do_cache_prepare_action(), HttpSM::do_icp_lookup(), HttpBodyFactory::fabricate_with_old_api(), fragment_get(), fragment_set(), HttpPagesHandler::handle_smlist(), hash_get(), host_get(), host_hash_get(), host_set(), length_get(), HttpTransact::merge_and_update_headers_for_cache_update(), nuke_proxy_stuff(), params_get(), params_set(), parse(), parse_no_path_component_breakdown(), password_get(), password_set(), path_get(), path_set(), port_get(), port_get_raw(), port_set(), print(), query_get(), query_set(), HttpSM::redirect_request(), UrlRewrite::Remap_redirect(), ICPPeerReadCont::PeerReadData::reset(), scheme_get(), scheme_get_wksidx(), scheme_set(), HttpTransact::set_headers_for_cache_write(), RemapProcessor::setup_for_remap(), string_get(), string_get_buf(), string_get_ref(), TSHttpTxnCacheLookupUrlGet(), TSHttpTxnNewCacheLookupDo(), TSHttpTxnRedirectRequest(), type_get(), type_set(), HttpSM::update_stats(), user_get(), user_set(), and UpdateEntry::~UpdateEntry().
Definition at line 260 of file URL.h.
Referenced by HTTPHdr::_fill_target_cache(), clear(), clear_string_ref(), copy(), copy_shallow(), create(), fragment_get(), fragment_set(), hash_get(), host_get(), host_hash_get(), host_set(), PrefetchBlaster::init(), length_get(), nuke_proxy_stuff(), params_get(), params_set(), parse(), parse_no_path_component_breakdown(), password_get(), password_set(), path_get(), path_set(), port_get(), port_get_raw(), port_set(), print(), query_get(), query_set(), HttpSM::redirect_request(), reset(), RemapPlugins::run_plugin(), scheme_get(), scheme_get_wksidx(), scheme_set(), string_get(), string_get_buf(), string_get_ref(), TSHttpTxnCacheLookupUrlGet(), TSHttpTxnNewCacheLookupDo(), TSHttpTxnPristineUrlGet(), TSHttpTxnRedirectRequest(), TSUrlFtpTypeGet(), TSUrlFtpTypeSet(), TSUrlParse(), TSUrlPortGet(), TSUrlPortSet(), TSUrlPrint(), type_get(), type_set(), HTTPHdr::url_get(), HTTPHdr::url_set(), HTTPHdr::url_set_as_server_url(), URLPartGet(), URLPartSet(), user_get(), user_set(), and valid().