Skip to content

Commit

Permalink
handle decode exceptions in myhttp
Browse files Browse the repository at this point in the history
  • Loading branch information
xmendez committed Oct 30, 2018
1 parent fe79a26 commit 7072ea3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/wfuzz/myhttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,13 @@ def _read_multi_stack(self):
# Parse response
buff_body, buff_header, res, poolid = c.response_queue

res.history.from_http_object(c, buff_header.getvalue(), buff_body.getvalue())

# reset type to result otherwise backfeed items will enter an infinite loop
self.pool_map[poolid]["queue"].put(res.update())
try:
res.history.from_http_object(c, buff_header.getvalue(), buff_body.getvalue())
except Exception as e:
self.pool_map[poolid]["queue"].put(res.update(exception=e))
else:
# reset type to result otherwise backfeed items will enter an infinite loop
self.pool_map[poolid]["queue"].put(res.update())

self.m.remove_handle(c)
self.freelist.put(c)
Expand Down

0 comments on commit 7072ea3

Please sign in to comment.