-
-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
This issue seems to be related to #161.
Consider this example :
#[test]
fn invalid_methods() {
let src = "\"some,unvalid%GET{}:; / HTTP/1.1\r\nHost: 127.0.0.1:80\r\n\r\n";
let mut headers = [httparse::EMPTY_HEADER; 32];
let mut req = httparse::Request::new(&mut headers);
let status = req.parse(src.as_bytes()).unwrap();
assert!(status.is_complete());
assert_eq!(req.method, Some("\"some,unvalid%GET{}:;"))
}From the MDN and my understanding of the RFC, methods MUST be defined by the following grammar:
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
"^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
Metadata
Metadata
Assignees
Labels
No labels