| 88 | } |
| 89 | |
| 90 | char *url_decode_mem(const char *url, int len) |
| 91 | { |
| 92 | struct strbuf out = STRBUF_INIT; |
| 93 | const char *colon = memchr(url, ':', len); |
| 94 | |
| 95 | /* Skip protocol part if present */ |
| 96 | if (colon && url < colon) { |
| 97 | strbuf_add(&out, url, colon - url); |
| 98 | len -= colon - url; |
| 99 | url = colon; |
| 100 | } |
| 101 | return url_decode_internal(&url, len, NULL, &out, 0); |
| 102 | } |
| 103 | |
| 104 | char *url_percent_decode(const char *encoded) |
| 105 | { |
no test coverage detected