Skip to content

Commit

Permalink
adding some code back that got munged in the merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Dec 14, 2020
1 parent 7010d6b commit c9de80a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dpkt/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,16 @@ def test_valid_header():
def test_invalid_header_messy():
# messy header.
s_messy_header = b'aaaaaaaaa\r\nbbbbbbbbb'
Request(s_messy_header)
try:
r = Request(s_messy_header)
except dpkt.UnpackError:
assert True
# If the http request is built successfully or raised exceptions
# other than UnpackError, then return a false assertion.
except:
assert False
else:
assert False


def test_gzip_response():
Expand Down

0 comments on commit c9de80a

Please sign in to comment.