| 1346 | } |
| 1347 | |
| 1348 | TSReturnCode |
| 1349 | TSUrlPercentEncode(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 |
| 1368 | TSReturnCode |
nothing calls this directly
no test coverage detected