util/UriUtil: add uri_get_suffix() overload that ignores query string

This commit is contained in:
Max Kellermann
2014-11-01 12:45:47 +01:00
parent 6ad336743d
commit 674091424e
3 changed files with 47 additions and 0 deletions

View File

@@ -35,6 +35,17 @@ gcc_pure
const char *
uri_get_suffix(const char *uri);
struct UriSuffixBuffer {
char data[8];
};
/**
* Returns the file name suffix, ignoring the query string.
*/
gcc_pure
const char *
uri_get_suffix(const char *uri, UriSuffixBuffer &buffer);
/**
* Returns true if this is a safe "local" URI:
*