| 4022 | } |
| 4023 | |
| 4024 | TSReturnCode |
| 4025 | TSHttpTxnServerRespGet(TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *obj) |
| 4026 | { |
| 4027 | sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); |
| 4028 | sdk_assert(sdk_sanity_check_null_ptr((void *)bufp) == TS_SUCCESS); |
| 4029 | sdk_assert(sdk_sanity_check_null_ptr((void *)obj) == TS_SUCCESS); |
| 4030 | |
| 4031 | HttpSM *sm = reinterpret_cast<HttpSM *>(txnp); |
| 4032 | HTTPHdr *hptr = &(sm->t_state.hdr_info.server_response); |
| 4033 | |
| 4034 | if (hptr->valid()) { |
| 4035 | *(reinterpret_cast<HTTPHdr **>(bufp)) = hptr; |
| 4036 | *obj = reinterpret_cast<TSMLoc>(hptr->m_http); |
| 4037 | sdk_assert(sdk_sanity_check_mbuffer(*bufp) == TS_SUCCESS); |
| 4038 | return TS_SUCCESS; |
| 4039 | } |
| 4040 | |
| 4041 | return TS_ERROR; |
| 4042 | } |
| 4043 | |
| 4044 | TSReturnCode |
| 4045 | TSHttpTxnCachedReqGet(TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *obj) |