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

Function TSUrlPercentEncode

src/api/InkAPI.cc:1348–1365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1346}
1347
1348TSReturnCode
1349TSUrlPercentEncode(TSMBuffer bufp, TSMLoc obj, char *dst, size_t dst_size, size_t *length, const unsigned char *map)
1350{
1351 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
1352 sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS);
1353
1354 char *url;
1355 int url_len;
1356 TSReturnCode ret;
1357 URLImpl *url_impl = reinterpret_cast<URLImpl *>(obj);
1358
1359 // TODO: at some point, it might be nice to allow this to write to a pre-allocated buffer
1360 url = url_string_get(url_impl, nullptr, &url_len, nullptr);
1361 ret = TSStringPercentEncode(url, url_len, dst, dst_size, length, map);
1362 ats_free(url);
1363
1364 return ret;
1365}
1366
1367// pton
1368TSReturnCode

Callers

nothing calls this directly

Calls 5

sdk_sanity_check_mbufferFunction · 0.85
url_string_getFunction · 0.85
TSStringPercentEncodeFunction · 0.85
ats_freeFunction · 0.85

Tested by

no test coverage detected