Skip to content

Commit 44783bf

Browse files
authored
Merge pull request #41 from swt2c/fix_bytes_route
Fix /bytes endpoint with newer werkzeug versions
2 parents a50a0d7 + 8b4bc05 commit 44783bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httpbin/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ def random_bytes(n):
14491449
response = make_response()
14501450

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

0 commit comments

Comments
 (0)