#include <HTTP.h>
Public Types | |
typedef HTTPCacheAlt::FragOffset | FragOffset |
Import type. | |
Public Member Functions | |
HTTPInfo () | |
~HTTPInfo () | |
void | clear () |
bool | valid () const |
void | create () |
void | destroy () |
void | copy (HTTPInfo *to_copy) |
void | copy_shallow (HTTPInfo *info) |
void | copy_frag_offsets_from (HTTPInfo *src) |
HTTPInfo & | operator= (const HTTPInfo &m) |
inkcoreapi int | marshal_length () |
inkcoreapi int | marshal (char *buf, int len) |
void | set_buffer_reference (RefCountObj *block_ref) |
int | get_handle (char *buf, int len) |
int32_t | id_get () const |
int32_t | rid_get () |
void | id_set (int32_t id) |
void | rid_set (int32_t id) |
INK_MD5 | object_key_get () |
void | object_key_get (INK_MD5 *) |
bool | compare_object_key (const INK_MD5 *) |
int64_t | object_size_get () |
void | request_get (HTTPHdr *hdr) |
void | response_get (HTTPHdr *hdr) |
HTTPHdr * | request_get () |
HTTPHdr * | response_get () |
URL * | request_url_get (URL *url=NULL) |
time_t | request_sent_time_get () |
time_t | response_received_time_get () |
void | object_key_set (INK_MD5 &md5) |
void | object_size_set (int64_t size) |
void | request_set (const HTTPHdr *req) |
void | response_set (const HTTPHdr *resp) |
void | request_sent_time_set (time_t t) |
void | response_received_time_set (time_t t) |
FragOffset * | get_frag_table () |
Get the fragment table. | |
int | get_frag_offset_count () |
Get the # of fragment offsets. | |
void | push_frag_offset (FragOffset offset) |
Add an offset to the end of the fragment offset table. | |
Static Public Member Functions | |
static int | unmarshal (char *buf, int len, RefCountObj *block_ref) |
static bool | check_marshalled (char *buf, int len) |
Data Fields | |
HTTPCacheAlt * | m_alt |
Definition at line 1347 of file HTTP.h.
bool HTTPInfo::check_marshalled | ( | char * | buf, | |
int | len | |||
) | [static] |
Definition at line 2015 of file HTTP.cc.
References CACHE_ALT_MAGIC_MARSHALED, HdrHeap::check_marshalled(), HdrHeapSDKHandle::m_heap, HTTPCacheAlt::m_magic, HTTPCacheAlt::m_request_hdr, HTTPCacheAlt::m_response_hdr, and HTTPCacheAlt::m_writeable.
void HTTPInfo::clear | ( | void | ) | [inline] |
Definition at line 1363 of file HTTP.h.
References m_alt.
Referenced by destroy(), get_handle(), HttpSM::setup_cache_write_transfer(), and ~HTTPInfo().
bool HTTPInfo::compare_object_key | ( | const INK_MD5 * | md5 | ) | [inline] |
Definition at line 1474 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_object_key.
void HTTPInfo::copy | ( | HTTPInfo * | to_copy | ) |
Definition at line 1817 of file HTTP.cc.
References HTTPCacheAlt::copy(), create(), destroy(), m_alt, and HTTPCacheAlt::m_writeable.
Referenced by ShowCache::handleCacheScanCallback().
void HTTPInfo::copy_frag_offsets_from | ( | HTTPInfo * | src | ) |
Definition at line 1829 of file HTTP.cc.
References HTTPCacheAlt::copy_frag_offsets_from(), and m_alt.
void HTTPInfo::copy_shallow | ( | HTTPInfo * | info | ) | [inline] |
void HTTPInfo::create | ( | ) |
Definition at line 1811 of file HTTP.cc.
References httpCacheAltAllocator, and m_alt.
Referenced by copy(), HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::merge_and_update_headers_for_cache_update(), HttpTransact::set_headers_for_cache_write(), and TSHttpTxnCachedRespModifiableGet().
void HTTPInfo::destroy | ( | ) | [inline] |
Definition at line 1428 of file HTTP.h.
References clear(), HTTPCacheAlt::destroy(), RefCountObj::free(), m_alt, HTTPCacheAlt::m_ext_buffer, HTTPCacheAlt::m_writeable, and RefCountObj::refcount_dec().
Referenced by copy(), and HttpTransact::State::destroy().
int HTTPInfo::get_frag_offset_count | ( | ) | [inline] |
Get the # of fragment offsets.
Definition at line 1520 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_frag_offset_count.
HTTPInfo::FragOffset * HTTPInfo::get_frag_table | ( | ) | [inline] |
Get the fragment table.
Definition at line 1514 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_frag_offsets.
int HTTPInfo::get_handle | ( | char * | buf, | |
int | len | |||
) |
Definition at line 2095 of file HTTP.cc.
References a, CACHE_ALT_MAGIC_ALIVE, clear(), ink_assert, m_alt, HTTPCacheAlt::m_magic, and HTTPCacheAlt::m_unmarshal_len.
int32_t HTTPInfo::id_get | ( | ) | const [inline] |
Definition at line 1380 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_id.
void HTTPInfo::id_set | ( | int32_t | id | ) | [inline] |
Definition at line 1383 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_id.
int HTTPInfo::marshal | ( | char * | buf, | |
int | len | |||
) |
Definition at line 1857 of file HTTP.cc.
References CACHE_ALT_MAGIC_ALIVE, ink_assert, ink_release_assert, m_alt, HTTPCacheAlt::m_ext_buffer, HTTPCacheAlt::m_frag_offset_count, HTTPCacheAlt::m_frag_offsets, HdrHeapSDKHandle::m_heap, HTTPCacheAlt::m_integral_frag_offsets, HTTPCacheAlt::m_magic, HTTPCacheAlt::m_request_hdr, HTTPCacheAlt::m_response_hdr, HTTPCacheAlt::m_unmarshal_len, HTTPCacheAlt::m_writeable, HdrHeap::marshal(), memcpy, HTTPCacheAlt::N_INTEGRAL_FRAG_OFFSETS, and HTTPHdr::valid().
int HTTPInfo::marshal_length | ( | ) |
Definition at line 1836 of file HTTP.cc.
References m_alt, HTTPCacheAlt::m_frag_offset_count, HdrHeapSDKHandle::m_heap, HTTPCacheAlt::m_integral_frag_offsets, HTTPCacheAlt::m_request_hdr, HTTPCacheAlt::m_response_hdr, HdrHeap::marshal_length(), HTTPCacheAlt::N_INTEGRAL_FRAG_OFFSETS, and HTTPHdr::valid().
INK_MD5 HTTPInfo::object_key_get | ( | ) | [inline] |
Definition at line 1450 of file HTTP.h.
References m_alt, HTTPCacheAlt::m_object_key, and val.
void HTTPInfo::object_key_get | ( | INK_MD5 * | md5 | ) | [inline] |
Definition at line 1464 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_object_key.
void HTTPInfo::object_key_set | ( | INK_MD5 & | md5 | ) | [inline] |
Definition at line 1496 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_object_key.
int64_t HTTPInfo::object_size_get | ( | ) | [inline] |
Definition at line 1485 of file HTTP.h.
References m_alt, HTTPCacheAlt::m_object_size, and val.
Referenced by HttpTransact::change_response_header_because_of_range_request(), and HttpTransact::handle_content_length_header().
void HTTPInfo::object_size_set | ( | int64_t | size | ) | [inline] |
Definition at line 1506 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_object_size.
void HTTPInfo::push_frag_offset | ( | FragOffset | offset | ) |
Add an offset to the end of the fragment offset table.
Definition at line 2114 of file HTTP.cc.
References ats_free(), ats_malloc(), ink_assert, m_alt, HTTPCacheAlt::m_frag_offset_count, HTTPCacheAlt::m_frag_offsets, HTTPCacheAlt::m_integral_frag_offsets, memcpy, and HTTPCacheAlt::N_INTEGRAL_FRAG_OFFSETS.
void HTTPInfo::request_get | ( | HTTPHdr * | hdr | ) | [inline] |
Definition at line 1391 of file HTTP.h.
References HTTPHdr::copy_shallow(), m_alt, and HTTPCacheAlt::m_request_hdr.
Referenced by dump_hdr(), HttpTransact::handle_transform_ready(), ShowCache::handleCacheScanCallback(), HttpTransact::HandleUpdateCachedObject(), HttpTransact::is_cache_response_returnable(), HttpTransact::merge_and_update_headers_for_cache_update(), HttpTransact::set_headers_for_cache_write(), TSHttpTxnUpdateCachedObject(), and TSICPCachedReqGet().
HTTPHdr* HTTPInfo::request_get | ( | ) | [inline] |
Definition at line 1394 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_request_hdr.
time_t HTTPInfo::request_sent_time_get | ( | ) | [inline] |
Definition at line 1399 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_request_sent_time.
Referenced by HttpTransact::HandleUpdateCachedObject(), and HttpTransact::is_stale_cache_response_returnable().
void HTTPInfo::request_sent_time_set | ( | time_t | t | ) | [inline] |
Definition at line 1408 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_request_sent_time.
Referenced by HttpSM::setup_cache_write_transfer().
void HTTPInfo::request_set | ( | const HTTPHdr * | req | ) | [inline] |
Definition at line 1405 of file HTTP.h.
References HTTPHdr::copy(), m_alt, and HTTPCacheAlt::m_request_hdr.
Referenced by HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::HandleUpdateCachedObject(), HttpTransact::merge_and_update_headers_for_cache_update(), and HttpTransact::set_headers_for_cache_write().
Definition at line 1397 of file HTTP.h.
References m_alt, HTTPCacheAlt::m_request_hdr, and HTTPHdr::url_get().
void HTTPInfo::response_get | ( | HTTPHdr * | hdr | ) | [inline] |
Definition at line 1392 of file HTTP.h.
References HTTPHdr::copy_shallow(), m_alt, and HTTPCacheAlt::m_response_hdr.
Referenced by dump_hdr(), HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::handle_transform_ready(), ShowCache::handleCacheScanCallback(), HttpTransact::HandleUpdateCachedObject(), HttpTransact::is_cache_response_returnable(), HttpTransact::is_stale_cache_response_returnable(), HttpTransact::merge_and_update_headers_for_cache_update(), HttpTransact::set_headers_for_cache_write(), TSHttpTxnCachedRespModifiableGet(), TSHttpTxnServerRespIgnore(), TSHttpTxnUpdateCachedObject(), and TSICPCachedRespGet().
HTTPHdr* HTTPInfo::response_get | ( | ) | [inline] |
Definition at line 1395 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_response_hdr.
time_t HTTPInfo::response_received_time_get | ( | ) | [inline] |
Definition at line 1400 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_response_received_time.
Referenced by HttpTransact::HandleUpdateCachedObject(), HttpTransact::is_stale_cache_response_returnable(), and TSHttpTxnCachedRespTimeGet().
void HTTPInfo::response_received_time_set | ( | time_t | t | ) | [inline] |
Definition at line 1409 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_response_received_time.
Referenced by HttpSM::setup_cache_write_transfer().
void HTTPInfo::response_set | ( | const HTTPHdr * | resp | ) | [inline] |
Definition at line 1406 of file HTTP.h.
References HTTPHdr::copy(), m_alt, and HTTPCacheAlt::m_response_hdr.
Referenced by HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::merge_and_update_headers_for_cache_update(), HttpTransact::set_headers_for_cache_write(), and TSHttpTxnCachedRespModifiableGet().
int32_t HTTPInfo::rid_get | ( | ) | [inline] |
Definition at line 1381 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_rid.
void HTTPInfo::rid_set | ( | int32_t | id | ) | [inline] |
Definition at line 1384 of file HTTP.h.
References m_alt, and HTTPCacheAlt::m_rid.
void HTTPInfo::set_buffer_reference | ( | RefCountObj * | block_ref | ) |
Definition at line 2075 of file HTTP.cc.
References CACHE_ALT_MAGIC_ALIVE, RefCountObj::free(), ink_assert, m_alt, HTTPCacheAlt::m_ext_buffer, HTTPCacheAlt::m_magic, RefCountObj::refcount_dec(), and RefCountObj::refcount_inc().
int HTTPInfo::unmarshal | ( | char * | buf, | |
int | len, | |||
RefCountObj * | block_ref | |||
) | [static] |
Definition at line 1932 of file HTTP.cc.
References ats_malloc(), CACHE_ALT_MAGIC_ALIVE, CACHE_ALT_MAGIC_MARSHALED, HDR_HEAP_OBJ_HTTP_HEADER, ink_assert, HTTPCacheAlt::m_frag_offset_count, HTTPCacheAlt::m_frag_offsets, HdrHeapSDKHandle::m_heap, HTTPHdr::m_http, HTTPCacheAlt::m_integral_frag_offsets, HTTPCacheAlt::m_magic, MIMEHdr::m_mime, HTTPCacheAlt::m_request_hdr, HTTPCacheAlt::m_response_hdr, HTTPCacheAlt::m_unmarshal_len, HTTPHdr::m_url_cached, HTTPCacheAlt::m_writeable, memcpy, HTTPCacheAlt::N_INTEGRAL_FRAG_OFFSETS, and HdrHeap::unmarshal().
Referenced by cache_op_ClusterFunction(), cache_op_result_ClusterFunction(), and set_channel_data_ClusterFunction().
bool HTTPInfo::valid | ( | ) | const [inline] |
Definition at line 1364 of file HTTP.h.
References m_alt.
Referenced by HttpTransact::change_response_header_because_of_range_request(), HttpTransact::HandleUpdateCachedObject(), HttpTransact::merge_and_update_headers_for_cache_update(), HttpTransact::set_headers_for_cache_write(), TSHttpTxnCachedReqGet(), TSHttpTxnCachedRespGet(), TSHttpTxnCachedRespModifiableGet(), TSHttpTxnCachedRespTimeGet(), TSHttpTxnServerRespIgnore(), TSHttpTxnUpdateCachedObject(), TSICPCachedReqGet(), and TSICPCachedRespGet().
Definition at line 1352 of file HTTP.h.
Referenced by clear(), compare_object_key(), copy(), copy_frag_offsets_from(), copy_shallow(), create(), destroy(), get_frag_offset_count(), get_frag_table(), get_handle(), id_get(), id_set(), marshal(), marshal_length(), object_key_get(), object_key_set(), object_size_get(), object_size_set(), operator=(), push_frag_offset(), request_get(), request_sent_time_get(), request_sent_time_set(), request_set(), request_url_get(), response_get(), response_received_time_get(), response_received_time_set(), response_set(), rid_get(), rid_set(), set_buffer_reference(), and valid().