Use uri_has_scheme for Webdav response href

Use uri_has_scheme to find out if the href in Webdav responses is absolute
to use the matching base path extraction.

Signed-off-by: Vincent Petry <PVince81@yahoo.fr>
This commit is contained in:
Vincent Petry
2021-01-05 12:04:08 +01:00
parent 216f62ea14
commit 74b2fc7fdc
3 changed files with 11 additions and 12 deletions

View File

@@ -85,7 +85,7 @@ uri_after_scheme(std::string_view uri) noexcept
}
bool
uri_has_scheme(const char *uri) noexcept
uri_has_scheme(std::string_view uri) noexcept
{
return !uri_get_scheme(uri).empty();
}

View File

@@ -40,7 +40,7 @@
*/
gcc_pure
bool
uri_has_scheme(const char *uri) noexcept;
uri_has_scheme(std::string_view uri) noexcept;
/**
* Returns the scheme name of the specified URI, or an empty string.