-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scheme parsing fix (https) and extending (ws, wss) (#1570)
Contributes to #755 Signed-off-by: Aleksey Mikhaylov <[email protected]>
- Loading branch information
Showing
2 changed files
with
201 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -657,6 +657,25 @@ TEST(http_parser, parses_req_uri) | |
EXPECT_TFWSTR_EQ(&req->host, "natsys-lab.com"); | ||
} | ||
|
||
FOR_REQ("GET https://[email protected] HTTP/1.1\r\n\r\n") | ||
{ | ||
EXPECT_TFWSTR_EQ(&req->host, "natsys-lab.com"); | ||
} | ||
|
||
FOR_REQ("GET ws://[email protected] HTTP/1.1\r\n\r\n") | ||
{ | ||
EXPECT_TFWSTR_EQ(&req->host, "natsys-lab.com"); | ||
} | ||
|
||
FOR_REQ("GET wss://[email protected] HTTP/1.1\r\n\r\n") | ||
{ | ||
EXPECT_TFWSTR_EQ(&req->host, "natsys-lab.com"); | ||
} | ||
|
||
FOR_REQ("OPTIONS * HTTP/1.1\r\n\r\n"); | ||
|
||
EXPECT_BLOCK_REQ("GET sch://[email protected] HTTP/1.1\r\n\r\n"); | ||
|
||
EXPECT_BLOCK_REQ("GET \x7f HTTP/1.1\r\n" | ||
"Host: test\r\n" | ||
"\r\n"); | ||
|