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

Method urlString

plugins/slice/HttpHeader.cc:57–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57char *
58HttpHeader::urlString(int *const urllen) const
59{
60 char *urlstr = nullptr;
61 TSAssert(nullptr != urllen);
62
63 TSMLoc locurl = nullptr;
64 TSReturnCode const rcode = TSHttpHdrUrlGet(m_buffer, m_lochdr, &locurl);
65 if (nullptr != locurl) {
66 if (TS_SUCCESS == rcode) {
67 urlstr = TSUrlStringGet(m_buffer, locurl, urllen);
68 } else {
69 *urllen = 0;
70 }
71 TSHandleMLocRelease(m_buffer, m_lochdr, locurl);
72 }
73
74 return urlstr;
75}
76
77bool
78HttpHeader::setUrl(TSMBuffer const bufurl, TSMLoc const locurl)

Callers 1

logSliceErrorFunction · 0.80

Calls 3

TSHttpHdrUrlGetFunction · 0.85
TSUrlStringGetFunction · 0.85
TSHandleMLocReleaseFunction · 0.85

Tested by

no test coverage detected