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

Function URLPartSet

src/api/InkAPI.cc:1070–1092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1068}
1069
1070static TSReturnCode
1071URLPartSet(TSMBuffer bufp, TSMLoc obj, const char *value, int length, URLPartSetF url_f)
1072{
1073 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
1074 sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS);
1075
1076 if (!isWriteable(bufp)) {
1077 return TS_ERROR;
1078 }
1079
1080 URL u;
1081 u.m_heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap;
1082 u.m_url_impl = reinterpret_cast<URLImpl *>(obj);
1083
1084 if (!value) {
1085 length = 0;
1086 } else if (length < 0) {
1087 length = strlen(value);
1088 }
1089 (u.*url_f)(value, length);
1090
1091 return TS_SUCCESS;
1092}
1093
1094const char *
1095TSUrlRawSchemeGet(TSMBuffer bufp, TSMLoc obj, int *length)

Callers 7

TSUrlSchemeSetFunction · 0.85
TSUrlUserSetFunction · 0.85
TSUrlPasswordSetFunction · 0.85
TSUrlHostSetFunction · 0.85
TSUrlPathSetFunction · 0.85
TSUrlHttpQuerySetFunction · 0.85
TSUrlHttpFragmentSetFunction · 0.85

Calls 3

sdk_sanity_check_mbufferFunction · 0.85
isWriteableFunction · 0.85

Tested by

no test coverage detected