We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79a8307 commit ee595caCopy full SHA for ee595ca
httplib.h
@@ -3043,8 +3043,8 @@ inline bool is_weak_etag(const std::string &s) {
3043
}
3044
3045
inline bool is_strong_etag(const std::string &s) {
3046
- // Check if the string is a strong ETag (starts with '"' but not 'W/"')
3047
- return !s.empty() && s[0] == '"';
+ // Check if the string is a strong ETag (starts and ends with '"', at least 2 chars)
+ return s.size() >= 2 && s[0] == '"' && s.back() == '"';
3048
3049
3050
inline size_t to_utf8(int code, char *buff) {
0 commit comments