Metadata-Version: 1.0
Name: wsgiheaders
Version: 0.0.1
Summary: Adding and replacing response headers
Home-page: http://www.bitbucket.org/aodag/wsgiheaders/
Author: Atsushi Odagiri
Author-email: aodagx@gmail.com
License: MIT License
Description: Adding and replacing response headers
        
        >>> @replaceheader([(r'.*\.html', [('Content-type', 'text/html')])])
        ... def app(environ, start_response):
        ...     start_response('200 OK',
        ...                    [('Content-type', 'text/plain')])
        ...     return ['Hello, world!']
        >>> import webtest
        >>> app = webtest.TestApp(app)
        >>> res = app.get('/a.txt')
        >>> res.content_type
        'text/plain'
        >>> res = app.get('/a.html')
        >>> res.content_type
        'text/html'
        >>> @addheader([('.*', [('X-XRDS', 'http://localhost/services.xrds')])])
        ... def app(environ, start_response):
        ...     start_response('200 OK',
        ...                    [('Content-type', 'text/plain')])
        ...     return ['Hello, world!']
        >>> app = webtest.TestApp(app)
        >>> res = app.get('/')
        >>> res.headers['X-XRDS']
        'http://localhost/services.xrds'
        
        
Platform: UNKNOWN
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 2 - Pre-Alpha
