W3C home > Mailing lists > Public > www-talk@w3.org > May to June 2002

RE: How web server sends images?

From: Mike Dierken <mike@dataconcert.com>
Date: Fri, 31 May 2002 09:45:25 -0700
Message-ID: <2AE31649CF989F4FB354F6D95EB0CE6E5CED1D@xmlfmail.xmlfund.com>
To: "'Mukul Gandhi'" <mukulw3@yahoo.com>, www-talk@w3.org



> -----Original Message-----
> From: Mukul Gandhi [mailto:mukulw3@yahoo.com] 
> Sent: Thursday, May 30, 2002 8:30 PM
> To: www-talk@w3.org
> Subject: How web server sends images?
> 
> 
> 
> I want to know how a standard Web Server(HTTP 1.1)
> sends image files to the browser. 
The server sends the image data in the body of an HTTP response message,
after the HTTP response headers.

> I believe it sends Content-type header to tell the type of content. 
That is the correct behavior. 

> Apart from that how does it actually send the image data? 
As a stream of binary data, in the format specified by the Content-Type
header.
For example a Content-Type: of image/jpeg would be in the standard JPEG
format.

> What encoding it does, 
In addition to the Content-Type header, it is possible to have a
Content-Encoding header that specifies that the message body is encoded -
for example the value 'gzip' indicates a specific compression algorithm.
It is important to note that the Content-Type header does NOT change when
encoding has happened - so all clients must be aware of this and examine
both headers to properly handle/dispatch/whatever the response.
In addition there is a Transfer-Encoding header which should be interpreted
by a client library for you automatically.

> where does it exactly place the data and what delimiters it specifies? 
The body of an HTTP message is separate from the header by a blank line
(carriage-return/linefeed).
The header are ASCII. The body is binary, whose format is specified by the
Content-Type header.

> Is there any document on Internet which describes this?
The HTTP 1.1 specification is here:
http://www.w3.org/Protocols/rfc2068/rfc2068

> 
> Regards,
> Mukul
> 
Received on Friday, 31 May 2002 12:47:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:27 GMT