MCPcopy Create free account
hub / github.com/apache/trafficserver / TSHttpTxnPristineUrlGet

Function TSHttpTxnPristineUrlGet

src/api/InkAPI.cc:3898–3922  ·  view source on GitHub ↗

pristine url is the url before remap

Source from the content-addressed store, hash-verified

3896
3897// pristine url is the url before remap
3898TSReturnCode
3899TSHttpTxnPristineUrlGet(TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *url_loc)
3900{
3901 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
3902 sdk_assert(sdk_sanity_check_null_ptr((void *)bufp) == TS_SUCCESS);
3903 sdk_assert(sdk_sanity_check_null_ptr((void *)url_loc) == TS_SUCCESS);
3904
3905 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
3906 HTTPHdr *hptr = &(sm->t_state.hdr_info.client_request);
3907
3908 if (hptr->valid()) {
3909 *(reinterpret_cast<HTTPHdr **>(bufp)) = hptr;
3910 *url_loc = reinterpret_cast<TSMLoc>(sm->t_state.unmapped_url.m_url_impl);
3911
3912 if (sdk_sanity_check_mbuffer(*bufp) == TS_SUCCESS) {
3913 if (*url_loc == nullptr) {
3914 *url_loc = reinterpret_cast<TSMLoc>(hptr->m_http->u.req.m_url_impl);
3915 }
3916 if (*url_loc) {
3917 return TS_SUCCESS;
3918 }
3919 }
3920 }
3921 return TS_ERROR;
3922}
3923
3924int
3925TSHttpTxnServerSsnTransactionCount(TSHttpTxn txnp)

Callers 15

_initializeMethod · 0.85
ClientRequest.ccFile · 0.85
TSRemapDoRemapFunction · 0.85
getClientStateMethod · 0.85
removeCacheKeyFunction · 0.85
read_requestFunction · 0.85
EscalateResponseFunction · 0.85
append_valueMethod · 0.85
CacheKeyMethod · 0.85
getPristineUrlPathFunction · 0.85
getPristineUrlQueryFunction · 0.85
initMethod · 0.85

Calls 4

sdk_sanity_check_txnFunction · 0.85
sdk_sanity_check_mbufferFunction · 0.85
validMethod · 0.45

Tested by

no test coverage detected