diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:49:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:49:36 +0000 |
commit | 5ec6074f0633939fd17d94111d10c6c6b062978c (patch) | |
tree | bfaa17b5a64abc66c918e9c70969e519d9e1df8e /url.h | |
parent | Initial commit. (diff) | |
download | git-5ec6074f0633939fd17d94111d10c6c6b062978c.tar.xz git-5ec6074f0633939fd17d94111d10c6c6b062978c.zip |
Adding upstream version 1:2.30.2.upstream/1%2.30.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'url.h')
-rw-r--r-- | url.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +#ifndef URL_H +#define URL_H + +struct strbuf; + +int is_url(const char *url); +int is_urlschemechar(int first_flag, int ch); +char *url_decode(const char *url); +char *url_decode_mem(const char *url, int len); + +/* + * Similar to the url_decode_{,mem} methods above, but doesn't assume there + * is a scheme followed by a : at the start of the string. Instead, %-sequences + * before any : are also parsed. + */ +char *url_percent_decode(const char *encoded); + +char *url_decode_parameter_name(const char **query); +char *url_decode_parameter_value(const char **query); + +void end_url_with_slash(struct strbuf *buf, const char *url); +void str_end_url_with_slash(const char *url, char **dest); + +#endif /* URL_H */ |