Skip to content

Commit

Permalink
Merge pull request #41 from swt2c/fix_bytes_route
Browse files Browse the repository at this point in the history
Fix /bytes endpoint with newer werkzeug versions
  • Loading branch information
sigmavirus24 committed Mar 22, 2024
2 parents a50a0d7 + 8b4bc05 commit 44783bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httpbin/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ def random_bytes(n):
response = make_response()

# Note: can't just use os.urandom here because it ignores the seed
response.data = bytearray(random.randint(0, 255) for i in range(n))
response.data = bytes(random.randint(0, 255) for i in range(n))
response.content_type = "application/octet-stream"
return response

Expand Down

0 comments on commit 44783bf

Please sign in to comment.