| 3873 | } |
| 3874 | |
| 3875 | TSReturnCode |
| 3876 | TSHttpTxnClientReqGet(TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *obj) |
| 3877 | { |
| 3878 | sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); |
| 3879 | sdk_assert(sdk_sanity_check_null_ptr((void *)bufp) == TS_SUCCESS); |
| 3880 | sdk_assert(sdk_sanity_check_null_ptr((void *)obj) == TS_SUCCESS); |
| 3881 | |
| 3882 | HttpSM *sm = reinterpret_cast<HttpSM *>(txnp); |
| 3883 | HTTPHdr *hptr = &(sm->t_state.hdr_info.client_request); |
| 3884 | |
| 3885 | if (hptr->valid()) { |
| 3886 | *(reinterpret_cast<HTTPHdr **>(bufp)) = hptr; |
| 3887 | *obj = reinterpret_cast<TSMLoc>(hptr->m_http); |
| 3888 | if (sdk_sanity_check_mbuffer(*bufp) == TS_SUCCESS) { |
| 3889 | hptr->mark_target_dirty(); |
| 3890 | return TS_SUCCESS; |
| 3891 | ; |
| 3892 | } |
| 3893 | } |
| 3894 | return TS_ERROR; |
| 3895 | } |
| 3896 | |
| 3897 | // pristine url is the url before remap |
| 3898 | TSReturnCode |