Reputation: 23169
I am currently developing a HTTP server.
When a client requests a PNG, my response headers are properly formatted and respond with Content-Type : image/png
What steps and encoding processes do I have to perform on my .png file to send it as a byte[] in the http response body?
Thanks!
Upvotes: 2
Views: 593
Reputation: 39014
As others have said, none, HOWEVER, for extra credit your server should check if the client accepts gzip encoding (look at the 'accept-encoding' header) when sending text or xml documents (images are compressed already) and send gzip with a content-encoding header.
Also accept, accept-charset and accept-language should be respected.
All are documented in RFC2616 (HTTP 1.1)
Upvotes: 1
Reputation: 75025
None, unless specified by the Transfer-Encoding
HTTP header.
It is all very well-documented.
Upvotes: 2