shared/webutil: reorder .c to match .h, mark one more function as _pure_

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-04-16 21:12:20 +02:00
parent 5bbbe210a4
commit fca491e036
2 changed files with 14 additions and 16 deletions
+13 -13
View File
@@ -5,19 +5,6 @@
#include "utf8.h"
#include "web-util.h"
bool http_etag_is_valid(const char *etag) {
if (isempty(etag))
return false;
if (!endswith(etag, "\""))
return false;
if (!STARTSWITH_SET(etag, "\"", "W/\""))
return false;
return true;
}
bool http_url_is_valid(const char *url) {
const char *p;
@@ -62,3 +49,16 @@ bool documentation_url_is_valid(const char *url) {
return ascii_is_valid(p);
}
bool http_etag_is_valid(const char *etag) {
if (isempty(etag))
return false;
if (!endswith(etag, "\""))
return false;
if (!STARTSWITH_SET(etag, "\"", "W/\""))
return false;
return true;
}
+1 -3
View File
@@ -5,7 +5,5 @@
bool http_url_is_valid(const char *url) _pure_;
bool file_url_is_valid(const char *url) _pure_;
bool documentation_url_is_valid(const char *url) _pure_;
bool http_etag_is_valid(const char *etag);
bool http_etag_is_valid(const char *etag) _pure_;