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

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

Best Answer

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.