From 608cc746ad60bc2aa8db22814fe887fece4ea89b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 28 Oct 2020 19:10:44 +0100 Subject: uri: add uri_parse() - new function extracts components from an URI --- uri.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 uri.h (limited to 'uri.h') diff --git a/uri.h b/uri.h new file mode 100644 index 00000000..b63290c5 --- /dev/null +++ b/uri.h @@ -0,0 +1,11 @@ +#pragma once + +#include +#include +#include + +bool uri_parse(const char *uri, size_t len, + char **scheme, char **user, char **password, char **host, + uint16_t *port, char **path, char **query, char **fragment); + +bool hostname_is_localhost(const char *hostname); -- cgit v1.3