Tags:
create new tag
, view all tags
In order to be be HTTP/1.1 compliant:
    """All HTTP/1.1 applications MUST be able to receive and decode the "chunked" transfer-coding, and MUST ignore chunk-extension extensions they do not understand.

Chunked transfer coding/encoding is actually quite complex :

  • HTTP 1.0 messages contains a header, and a body of a known content-length or teminated by end of file.
  • HTTP/1.1 messages are the same format, but have another equally valid format which consists of a header, a sequence of chunks of the body, preceded by a length indicator with the final chunk indicated by a 0 length. After this trailers (which have the same format as headers) may follow, and must be dealt with.

TWiki does not handle ChunkedTransferEncoding, and it is relatively complex to deal with, and it is designed for help in optimising persistant connections, but additionally helps with cacheability of the results of CGI (or similar) scripts which start sending data before knowing the length of the object they're sending. (The chunks let the recipient know transfer is still in progress, the trailer allows the definition of a content-length value which helps with cacheability)

Any client that does not support it may not send an indication that it supports HTTP/1.1 responses.

See RFC 2616 for more details.

Furthermore, you can send a request including HTTP/1.1 headers from a client that is only HTTP/1.0 compliant to a server including a protocol version of HTTP/1.0 - for example the following request is valid, even though it contains lots of HTTP/1.1 features:

    GET / HTTP/1.0
    Host: www.google.com
    Cache-Control: no-cache
    Max-Forwards: 0
    If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
    

The response however will be HTTP/1.0 compliant - that is not contain chunked coding & so on. The reason for this is because """Since the protocol version indicates the protocol capability of the sender""" - ie "give me an HTTP/1.0 compliant response please", not "the following message is an HTTP/1.1 compliant request".

This simple/key misunderstanding is the source of numerous bugs in TWiki. A patch that downgrades TWiki's requests to correctly request HTTP/1.0 responses is in ProxiedIncludesBrokenImplementationBug .

For those curious for a walk through HTTP history may wish to look at http://www.w3.org/Protocols/HTTP/HTTP2.html - it's rather entertaining from a modern perspective.

-- MichaelSparks - 15 Aug 2003

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2005-07-22 - JackWan
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.