Shortcut to just get the URL. The caller is responsible to free memory that is allocated for the string that is returned.
| 3935 | // The caller is responsible to free memory that is allocated for the string |
| 3936 | // that is returned. |
| 3937 | char * |
| 3938 | TSHttpTxnEffectiveUrlStringGet(TSHttpTxn txnp, int *length) |
| 3939 | { |
| 3940 | sdk_assert(TS_SUCCESS == sdk_sanity_check_txn(txnp)); |
| 3941 | sdk_assert(sdk_sanity_check_null_ptr((void *)length) == TS_SUCCESS); |
| 3942 | |
| 3943 | HttpSM *sm = reinterpret_cast<HttpSM *>(txnp); |
| 3944 | return sm->t_state.hdr_info.client_request.url_string_get(nullptr, length); |
| 3945 | } |
| 3946 | |
| 3947 | TSReturnCode |
| 3948 | TSHttpHdrEffectiveUrlBufGet(TSMBuffer hdr_buf, TSMLoc hdr_loc, char *buf, int64_t size, int64_t *length) |