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

Function TSUrlSchemeGet

src/api/InkAPI.cc:1100–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098}
1099
1100const char *
1101TSUrlSchemeGet(TSMBuffer bufp, TSMLoc obj, int *length)
1102{
1103 char const *data = TSUrlRawSchemeGet(bufp, obj, length);
1104 if (data && *length) {
1105 return data;
1106 }
1107 switch (reinterpret_cast<URLImpl *>(obj)->m_url_type) {
1108 case URL_TYPE_HTTP:
1109 data = URL_SCHEME_HTTP;
1110 *length = URL_LEN_HTTP;
1111 break;
1112 case URL_TYPE_HTTPS:
1113 data = URL_SCHEME_HTTPS;
1114 *length = URL_LEN_HTTPS;
1115 break;
1116 default:
1117 *length = 0;
1118 data = nullptr;
1119 }
1120 return data;
1121}
1122
1123TSReturnCode
1124TSUrlSchemeSet(TSMBuffer bufp, TSMLoc obj, const char *value, int length)

Callers 15

GetSVMethod · 0.85
getSchemeMethod · 0.85
testsForReqHdrFunction · 0.85
populateMethod · 0.85
append_valueMethod · 0.85
getCanonicalUrlFunction · 0.85
getPropertyMethod · 0.85
read_requestFunction · 0.85
schemeMethod · 0.85

Calls 1

TSUrlRawSchemeGetFunction · 0.85

Tested by 3

testsForReqHdrFunction · 0.68