mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-09-05 16:13:47 +00:00
Drop the empty Accept entry from the example's invalid list
e96a52e made a leading comma legal, so the example printed
"Unexpectedly succeeded!" for ",application/json". Reported in #2570.
This commit is contained in:
@@ -55,8 +55,7 @@ int main() {
|
|||||||
"text/html;q=1.5,application/json", // q > 1.0
|
"text/html;q=1.5,application/json", // q > 1.0
|
||||||
"text/html;q=-0.1,application/json", // q < 0.0
|
"text/html;q=-0.1,application/json", // q < 0.0
|
||||||
"text/html;q=invalid,application/json", // invalid q value
|
"text/html;q=invalid,application/json", // invalid q value
|
||||||
"invalidtype,application/json", // invalid media type
|
"invalidtype,application/json" // invalid media type
|
||||||
",application/json" // empty entry
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto &invalid_accept : invalid_examples) {
|
for (const auto &invalid_accept : invalid_examples) {
|
||||||
|
|||||||
Reference in New Issue
Block a user