Edgewall Software

Changes between Version 6 and Version 7 of TracDev/ApiChanges/0.12


Ignore:
Timestamp:
Sep 7, 2009, 10:53:54 PM (15 years ago)
Author:
Christian Boos
Comment:

Note about --http11 becoming the default for tracd and the consequences for the code

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ApiChanges/0.12

    v6 v7  
    8484See also #8159.
    8585
     86==== [TracStandalone tracd] and HTTP/1.1 ====
     87
     88Since 0.11.5, tracd could be used with the `--http11` flag, which would select the use of the HTTP/1.1 protocol and most notably activate Keep-Alive connections. This is now the default behavior in 0.12.
     89
     90This has some important consequences for plugins which send content directly to the client. They should take care of setting the `Content-Length` header properly, otherwise the browser will simply "hang".
     91
     92This means that any:
     93{{{
     94#!python
     95    req.write(content)
     96}}}
     97must be preceded by a:
     98{{{
     99#!python
     100    req.send_header('Content-Length', len(content))
     101}}}
     102
     103Don't forget to do that for ''any'' data directly sent back to the client, including responses for XHRs (e.g. r8300).
     104This requires a some discipline in the coding, but the benefit is a huge performance boost for tracd, so it's well worth the price.
     105
     106See #8020 for details.
     107
    86108
    87109== New in the 0.12 API ==