Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binary data over HTTP using Content-Type: application/octet-stream encoding overhead

Tags:

http

If I send binary data over HTTP using the standard Content-Type: application/octet-stream header, what would be the overhead? ignoring HTTP header - I'm talking about data \ encoding overhead only byte count wise.

Thanks

like image 700
sternr Avatar asked Sep 03 '25 07:09

sternr


1 Answers

Why should there be any overhead? HTTP does not usually do things like base64 encoding (you may be thinking of e-mail, which mostly uses different 7bit encodings creating a lot of overhead). The content-type header has little to nothing to do with your data encoding, but with how clients try to handle it. with octet-stream the clients will always prompt for a download, even when the file is text/plain from its content.

like image 90
allo Avatar answered Sep 04 '25 23:09

allo