summaryrefslogtreecommitdiff
path: root/swiftclient/client.py
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@enovance.com>2014-04-15 14:50:10 -0400
committerChmouel Boudjnah <chmouel@enovance.com>2014-04-17 12:04:43 -0400
commit504e5a7f53beb53ee1f099471017d63acf42cf65 (patch)
tree84829161d80ea8a3e13b9fbed8fa1225edc5382f /swiftclient/client.py
parent8830c81db7cd86f983e09cf1f4b8705930184bd4 (diff)
downloadpython-swiftclient-504e5a7f53beb53ee1f099471017d63acf42cf65.tar.gz
Remove validate_headers
It wasn't used anymore since moved up to requests (and it fails in py3). Change-Id: Ic8a80ae09ca6445696a9cf34ffb503c5ff51bc79
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r--swiftclient/client.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index 675fe2e..a482722 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -32,7 +32,7 @@ from time import sleep, time
import six
from swiftclient import version as swiftclient_version
-from swiftclient.exceptions import ClientException, InvalidHeadersException
+from swiftclient.exceptions import ClientException
from swiftclient.utils import LengthWrapper
try:
@@ -109,19 +109,6 @@ def quote(value, safe='/'):
return value
-def validate_headers(headers):
- if headers:
- for key, raw_value in headers.items():
- value = str(encode_utf8(raw_value))
-
- if '\n' in value:
- raise InvalidHeadersException("%r header contained a "
- "newline" % key)
- if '\r' in value:
- raise InvalidHeadersException("%r header contained a "
- "carriage return" % key)
-
-
def encode_utf8(value):
if isinstance(value, six.text_type):
value = value.encode('utf8')