This is a discussion on question about an HTTP response within the Linux Web Servers forums, part of the Web Server and Related Forums category; When I query an Apache web server running on UNIX with this: GET / HTTP/1.1 HOST: WWW I get ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
When I query an Apache web server running on UNIX with this:
GET / HTTP/1.1 HOST: WWW I get the following response: HTTP/1.1 200 OK Date: Wed, 07 Sep 2005 22:21:45 GMT Server: Apache/1.3.33 (Unix) mod_jk/1.2.3-dev PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/ 0.9.7e X-Powered-By: PHP/4.3.11 Transfer-Encoding: chunked Content-Type: text/html e40 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> [rest of html omitted] What is the e40 before the DOCTYPE line? It does not appear to be part of the entity body as it is ignored by the browser. |
|
|||
|
|
|
|||
|
<bobsweeney@email.com> wrote in message
news:1126133144.474592.268500@z14g2000cwz.googlegr oups.com... > When I query an Apache web server running on UNIX with this: > > GET / HTTP/1.1 > HOST: WWW > > I get the following response: > > HTTP/1.1 200 OK > Date: Wed, 07 Sep 2005 22:21:45 GMT > Server: Apache/1.3.33 (Unix) mod_jk/1.2.3-dev PHP/4.3.11 mod_ssl/2.8.22 > OpenSSL/ > 0.9.7e > X-Powered-By: PHP/4.3.11 > Transfer-Encoding: chunked > Content-Type: text/html > > e40 > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <html> > [rest of html omitted] > > What is the e40 before the DOCTYPE line? It does not appear to be part > of the entity body as it is ignored by the browser. > It is using 'chunked' data, which rather than sending the entire content-length sends the size of each chunk followed by the chunk of data itself. |
|
|||
|
bobsweeney@email.com writes:
>When I query an Apache web server running on UNIX with this: >I get the following response: >Transfer-Encoding: chunked >Content-Type: text/html > >e40 >[rest of html omitted] >What is the e40 before the DOCTYPE line? It does not appear to be part >of the entity body as it is ignored by the browser. HTTP content can be delivered in different transfer-encodings. You would expect just the content right? But this is only allowed if the HTTP header beforehand specifies the size of the content (remember that otherwise a keep-alive connection could never be implemented). In cases where the content size (using a Content-Length header) couldn't be determined beforehand, then Apache choses chunked encoding. In chunked encoded the peer gets a piece of the content at a time (a chunk), whenever Apache has a piece available to be delivered. The e40 is the hexadecimal encoding of the size of the piece. 0xe40 = 3648 bytes. After the last piece, a piece of zero bytes will be delivered, denoting the end of the input. You can Google for the exact implementation of the protocol using a RFC+chunked+HTTP query. \Berry |
| Thread Tools | |
| Display Modes | |
|
|