Allow quotes in URI

IE6 apparently sends such requests... Reported by Michael Carter.
version0.2
Ryan Dahl 15 years ago
parent da47c13169
commit 673cbef4c5

@ -312,7 +312,7 @@ do { \
national = any -- (alpha | digit | reserved | extra | safe | unsafe); national = any -- (alpha | digit | reserved | extra | safe | unsafe);
unreserved = (alpha | digit | safe | extra | national); unreserved = (alpha | digit | safe | extra | national);
escape = ("%" xdigit xdigit); escape = ("%" xdigit xdigit);
uchar = (unreserved | escape); uchar = (unreserved | escape | "\"");
pchar = (uchar | ":" | "@" | "&" | "=" | "+"); pchar = (uchar | ":" | "@" | "&" | "=" | "+");
tspecials = ("(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\\" | "\"" tspecials = ("(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\\" | "\""
| "/" | "[" | "]" | "?" | "=" | "{" | "}" | " " | "\t"); | "/" | "[" | "]" | "?" | "=" | "{" | "}" | " " | "\t");

@ -302,6 +302,21 @@ const struct message requests[] =
,.body= "hello world" ,.body= "hello world"
} }
#define WITH_QUOTES 12
, {.name= "with quotes"
,.type= HTTP_REQUEST
,.raw= "GET /with_\"stupid\"_quotes?foo=\"bar\" HTTP/1.1\r\n\r\n"
,.should_keep_alive= TRUE
,.method= HTTP_GET
,.query_string= "foo=\"bar\""
,.fragment= ""
,.request_path= "/with_\"stupid\"_quotes"
,.request_uri= "/with_\"stupid\"_quotes?foo=\"bar\""
,.num_headers= 0
,.headers= { }
,.body= ""
}
, {.name= NULL } /* sentinel */ , {.name= NULL } /* sentinel */
}; };

Loading…
Cancel
Save