Skip to content

Handle invalid/malformed data from clients in HttpParser #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Nov 18, 2021
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8fadf49
add validation in _process_line in parser.py
JerryKwan Nov 15, 2021
604b0c4
quick fail when parsing request
JerryKwan Nov 15, 2021
e362fe8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 15, 2021
6df238c
Merge branch 'develop' into issue127
abhinavsingh Nov 15, 2021
594a3bf
remove unnecessary checks and empty line
JerryKwan Nov 15, 2021
011a1e7
Merge branch 'issue127' of https://github.com/JerryKwan/proxy.py into…
JerryKwan Nov 15, 2021
6598fad
minor fix
JerryKwan Nov 15, 2021
7bd340f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 15, 2021
5ef7e22
solve exception expression conflict
JerryKwan Nov 15, 2021
22ffb9f
Merge branch 'issue127' of https://github.com/JerryKwan/proxy.py into…
JerryKwan Nov 15, 2021
dfcd179
Merge branch 'develop' into issue127
JerryKwan Nov 15, 2021
b00a208
Merge branch 'develop' into issue127
abhinavsingh Nov 15, 2021
c64b41f
use NotImplementedError temporary measure
JerryKwan Nov 16, 2021
eff7f6c
Merge branch 'issue127' of https://github.com/JerryKwan/proxy.py into…
JerryKwan Nov 16, 2021
ad50b5d
Merge branch 'develop' into issue127
JerryKwan Nov 16, 2021
00c8e27
Merge branch 'develop' into issue127
abhinavsingh Nov 18, 2021
96482ed
change exception type in test
JerryKwan Nov 18, 2021
e5da7a4
Merge branch 'issue127' of https://github.com/JerryKwan/proxy.py into…
JerryKwan Nov 18, 2021
127e962
Merge branch 'develop' into issue127
abhinavsingh Nov 18, 2021
27bdcef
remove unnecessary import
JerryKwan Nov 18, 2021
10dcb47
Merge branch 'issue127' of https://github.com/JerryKwan/proxy.py into…
JerryKwan Nov 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
solve exception expression conflict
solve exception expression conflict
  • Loading branch information
JerryKwan committed Nov 15, 2021
commit 5ef7e22ea32fdf334b33e1ab71c54f84c3f6fe27
2 changes: 1 addition & 1 deletion proxy/http/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def _process_line(self, raw: bytes) -> None:
self.state = httpParserStates.LINE_RCVD
else:
# raise exception
raise HttpProtocolException("Invalid request line")
raise HttpProtocolException('Invalid request line')
else:
line = raw.split(WHITESPACE)
self.version = line[0]
Expand Down