Skip to content

Commit

Permalink
TIL that int(b'hex', 16) works fine on Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Oct 26, 2017
1 parent 49ecd03 commit 7a16ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zope/server/http/chunking.py
Expand Up @@ -68,7 +68,7 @@ def received(self, s):
if semi >= 0:
# discard extension info.
line = line[:semi]
sz = int(line.strip().decode(), 16) # hexadecimal
sz = int(line.strip(), 16) # hexadecimal
if sz > 0:
# Start a new chunk.
self.chunk_remainder = sz
Expand Down

0 comments on commit 7a16ad2

Please sign in to comment.