httpbin
httpbin copied to clipboard
base64 endpoint status 500 with binary data
I want to use httpbin to test different binary response types, in this case having a null value in the middle of a response like the following 8 bytes of hex response:
cb d2 7c 42 00 a9 78 c2
I tried to base64 encode the value to use with the base 64 endpoint (as GET with Accept: application/octet-stream):
http://httpbin.org/base64/y9J8QgCpeMI=
But that results in the following http response showing an error:
Incorrect Base64 data try: SFRUUEJJTiBpcyBhd2Vzb21l
I have the same problem, when trying to feed a Base64-encoded CRL in DER format to the /base64/
endpoint.
Maybe leaving the .decode("utf-8")
away in https://github.com/postmanlabs/httpbin/blob/master/httpbin/core.py#L1309 would fix the problem?