summaryrefslogtreecommitdiff
path: root/paste/httpheaders.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2006-07-17 16:10:58 +0000
committerianb <devnull@localhost>2006-07-17 16:10:58 +0000
commit30af1b988a14b2d73354301142274510e86d57d7 (patch)
treea66ea97012fd09082a9c2446befba613a2b4566e /paste/httpheaders.py
parentd959df3d5b7eb6c0efcbcc484823ee08628b4b0c (diff)
downloadpaste-30af1b988a14b2d73354301142274510e86d57d7.tar.gz
Added tests for file-related conditional requests. Added support for If-None-Match to DataApp. Added parsing support for multi-value headers.
Diffstat (limited to 'paste/httpheaders.py')
-rw-r--r--paste/httpheaders.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/paste/httpheaders.py b/paste/httpheaders.py
index 6af05c3..2920523 100644
--- a/paste/httpheaders.py
+++ b/paste/httpheaders.py
@@ -508,6 +508,13 @@ class _MultiValueHeader(HTTPHeader):
return ''
return ", ".join([str(v).strip() for v in results])
+ def parse(self, *args, **kwargs):
+ value = self.__call__(*args, **kwargs)
+ values = value.split(',')
+ return [
+ v.strip() for v in values
+ if v.strip()]
+
class _MultiEntryHeader(HTTPHeader):
"""
a multi-value ``HTTPHeader`` where items cannot be combined with a comma