shared/webutil: reorder .c to match .h, mark one more function as _pure_
This commit is contained in:
+13
-13
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user