Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python-websockets/websockets
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1726dba17ac0f60114ed1fe2491de50637609e92
Choose a base ref
..
head repository: python-websockets/websockets
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 61e0e1c10f9895a15b34f0d43f160c6b4861e18b
Choose a head ref
Showing with 6 additions and 6 deletions.
  1. +2 −2 fuzzing/fuzz_http11_request_parser.py
  2. +2 −2 fuzzing/fuzz_http11_response_parser.py
  3. +2 −2 fuzzing/fuzz_websocket_parser.py
4 changes: 2 additions & 2 deletions fuzzing/fuzz_http11_request_parser.py
Original file line number Diff line number Diff line change
@@ -22,13 +22,13 @@ def test_one_input(data):
next(parser)
except StopIteration as exc:
assert isinstance(exc.value, Request)
return
return # input accepted
except (
EOFError, # connection is closed without a full HTTP request
SecurityError, # request exceeds a security limit
ValueError, # request isn't well formatted
):
pass
return # input rejected with a documented exception

raise RuntimeError("parsing didn't complete")

4 changes: 2 additions & 2 deletions fuzzing/fuzz_http11_response_parser.py
Original file line number Diff line number Diff line change
@@ -23,14 +23,14 @@ def test_one_input(data):
next(parser)
except StopIteration as exc:
assert isinstance(exc.value, Response)
return
return # input accepted
except (
EOFError, # connection is closed without a full HTTP response
SecurityError, # response exceeds a security limit
LookupError, # response isn't well formatted
ValueError, # response isn't well formatted
):
pass
return # input rejected with a documented exception

raise RuntimeError("parsing didn't complete")

4 changes: 2 additions & 2 deletions fuzzing/fuzz_websocket_parser.py
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@ def test_one_input(data):
next(parser)
except StopIteration as exc:
assert isinstance(exc.value, Frame)
return
return # input accepted
except (
PayloadTooBig, # frame's payload size exceeds ``max_size``
ProtocolError, # frame contains incorrect values
):
pass
return # input rejected with a documented exception

raise RuntimeError("parsing didn't complete")