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

Function TSHttpHdrUrlSet

src/api/InkAPI.cc:2852–2877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2850}
2851
2852TSReturnCode
2853TSHttpHdrUrlSet(TSMBuffer bufp, TSMLoc obj, TSMLoc url)
2854{
2855 // Allow to modify the buffer only
2856 // if bufp is modifiable. If bufp is not modifiable return
2857 // TS_ERROR. If allowed, return TS_SUCCESS. Changed the
2858 // return value of function from void to TSReturnCode.
2859 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
2860 sdk_assert(sdk_sanity_check_http_hdr_handle(obj) == TS_SUCCESS);
2861 sdk_assert(sdk_sanity_check_url_handle(url) == TS_SUCCESS);
2862
2863 if (!isWriteable(bufp)) {
2864 return TS_ERROR;
2865 }
2866
2867 HdrHeap *heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap;
2868 HTTPHdrImpl *hh = reinterpret_cast<HTTPHdrImpl *>(obj);
2869
2870 if (hh->m_type != HDR_HEAP_OBJ_HTTP_HEADER) {
2871 return TS_ERROR;
2872 }
2873
2874 URLImpl *url_impl = reinterpret_cast<URLImpl *>(url);
2875 http_hdr_url_set(heap, hh, url_impl);
2876 return TS_SUCCESS;
2877}
2878
2879TSHttpStatus
2880TSHttpHdrStatusGet(TSMBuffer bufp, TSMLoc obj)

Callers 7

setUrlMethod · 0.85
execMethod · 0.85
initMethod · 0.85
initializeMethod · 0.85
initializeMethod · 0.85
url_setMethod · 0.85

Calls 5

sdk_sanity_check_mbufferFunction · 0.85
isWriteableFunction · 0.85
http_hdr_url_setFunction · 0.85

Tested by 1