mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-03 13:28:44 +00:00
Fix #416
This commit is contained in:
1 parent
03a82ef848
commit
e4ad3010be
2 files changed
+8
-7
No files matched your search
+3
-2
@@ -306,9 +306,9 @@ static const char *test_base64_encode(void) {
|
||||
}
|
||||
|
||||
static const char *test_mg_parse_header(void) {
|
||||
const char *str = "xx=1 kl yy, ert=234 kl=123, "
|
||||
const char *str = "xx=1 kl yy, ert=234 kl=123, uri=\"/?name=x,y\", "
|
||||
"ii=\"12\\\"34\" zz='aa bb',tt=2,gf=\"xx d=1234";
|
||||
char buf[10];
|
||||
char buf[20];
|
||||
ASSERT(mg_parse_header(str, "yy", buf, sizeof(buf)) == 0);
|
||||
ASSERT(mg_parse_header(str, "ert", buf, sizeof(buf)) == 3);
|
||||
ASSERT(strcmp(buf, "234") == 0);
|
||||
@@ -331,6 +331,7 @@ static const char *test_mg_parse_header(void) {
|
||||
ASSERT(strcmp(buf, "12\"34") == 0);
|
||||
ASSERT(mg_parse_header(str, "tt", buf, sizeof(buf)) == 1);
|
||||
ASSERT(strcmp(buf, "2") == 0);
|
||||
ASSERT(mg_parse_header(str, "uri", buf, sizeof(buf)) == 10);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user