Code

Changes between Version 24 and Version 25 of ContributedMiddleware


Ignore:
Timestamp:
08/22/06 22:42:55 (8 years ago)
Author:
Gary Wilson <gary.wilson@…>
Comment:

link to wiki page instead of attachment

Legend:

Unmodified
Added
Removed
Modified
  • ContributedMiddleware

    v24 v25  
    3232 
    3333 
    34 === [http://code.djangoproject.com/attachment/wiki/ContributedMiddleware/StripWhitespaceMiddleware.py Strip Whitespace Middleware] by Doug Van Horn === 
     34== StripWhitespaceMiddleware by Doug Van Horn == 
    3535 
    3636Removes extra whitespace from response content.  It's kind of nice for removing extra line breaks, but it also removes leading spaces.  Probably not too important for most of us, but for the bandwidth conscious it might be helpful.  If you would like to keep your indentions intact, then use `'\s*\n+'` as the regular expression string instead of `'\s*\n+\s*'`.