diff options
| author | cce <devnull@localhost> | 2005-12-27 20:50:56 +0000 |
|---|---|---|
| committer | cce <devnull@localhost> | 2005-12-27 20:50:56 +0000 |
| commit | 1d473c7ca00985e1824deef83dbdda4fa2e5f29d (patch) | |
| tree | 2491e1a6ebcd6b02dc355efe674758c11e0dac06 /paste/httpheaders.py | |
| parent | c8be1aa79910ff3d8a45e0744eb1f42371b5eb82 (diff) | |
| download | paste-1d473c7ca00985e1824deef83dbdda4fa2e5f29d.tar.gz | |
descriptive chanages
Diffstat (limited to 'paste/httpheaders.py')
| -rw-r--r-- | paste/httpheaders.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/paste/httpheaders.py b/paste/httpheaders.py index aa5e432..3658948 100644 --- a/paste/httpheaders.py +++ b/paste/httpheaders.py @@ -33,9 +33,7 @@ that takes one of the following: ``"public, max-age=60480"`` Each ``HTTPHeader`` instance also provides several methods wich act on -a WSGI collection, for setting or getting header values. The first -argument of these methods is the collection, and all remaining arguments -are equivalent to invoking ``__call__(*args, **kwargs)``. +a WSGI collection, for removing and setting header values. ``delete(collection)`` @@ -48,6 +46,9 @@ are equivalent to invoking ``__call__(*args, **kwargs)``. This method does an in-place replacement of the given header entry, for example: ``ContentLength(response_headers,len(body))`` + The first argument is a valid ``environ`` dictionary or + ``response_headers`` list; remaining arguments are passed on to + ``__call__(*args, **kwargs)`` for value construction. This particular approach to managing headers within a WSGI collection has several advantages: @@ -60,7 +61,7 @@ has several advantages: 2. For specific headers with validation, using ``__call__`` will result in an automatic header value check. For example, the ContentDisposition header will reject a value having ``maxage`` - or ``max_age`` (the appropriate parameter is ``max_age``). + or ``max_age`` (the appropriate parameter is ``max-age``). 3. When appending/replacing headers, the field-name has the suggested RFC capitalization (e.g. ``Content-Type`` or ``ETag``) for @@ -83,7 +84,7 @@ has several advantages: which violates the RFC's recommendation about combining header content into a single entry using comma separation [1] -A particular difficulty with HTTPHeaders is a categorization of +A particular difficulty with HTTP message headers is a categorization of sorts as described in section 4.2: Multiple message-header fields with the same field-name MAY be |
