diff options
author | Tim Burke <tim.burke@gmail.com> | 2018-09-15 01:33:34 -0600 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2018-09-15 01:33:34 -0600 |
commit | 2ef21ac05dba52fa6e7f50d2c6311221ef90945d (patch) | |
tree | 27ecdcbe89823174dbb3a51ae702eb1071b1b49a /swift/common/request_helpers.py | |
parent | b4567e66ec979252c155522ef89c738c8e762ef1 (diff) | |
download | swift-2ef21ac05dba52fa6e7f50d2c6311221ef90945d.tar.gz |
py3: port request_helpers
Change-Id: I6be1a1c618e4b4fa03b34dad96f378aca01e8e08
Diffstat (limited to 'swift/common/request_helpers.py')
-rw-r--r-- | swift/common/request_helpers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/swift/common/request_helpers.py b/swift/common/request_helpers.py index 1c43d04f1..3d0174d85 100644 --- a/swift/common/request_helpers.py +++ b/swift/common/request_helpers.py @@ -35,7 +35,7 @@ from swift.common.exceptions import ListingIterError, SegmentError from swift.common.http import is_success from swift.common.swob import HTTPBadRequest, \ HTTPServiceUnavailable, Range, is_chunked, multi_range_iterator, \ - HTTPPreconditionFailed + HTTPPreconditionFailed, wsgi_to_bytes from swift.common.utils import split_path, validate_device_partition, \ close_if_possible, maybe_multipart_byteranges_to_document_iters, \ multipart_byteranges_to_document_iters, parse_content_type, \ @@ -262,7 +262,7 @@ def remove_items(headers, condition): :returns: a dict, possibly empty, of headers that have been removed """ removed = {} - keys = filter(condition, headers) + keys = [key for key in headers if condition(key)] removed.update((key, headers.pop(key)) for key in keys) return removed @@ -651,7 +651,7 @@ def http_response_to_document_iters(response, read_chunk_size=4096): # extracted from the Content-Type header. params = dict(params_list) return multipart_byteranges_to_document_iters( - response, params['boundary'], read_chunk_size) + response, wsgi_to_bytes(params['boundary']), read_chunk_size) def update_etag_is_at_header(req, name): |