diff options
Diffstat (limited to 'netlib/http')
-rw-r--r-- | netlib/http/headers.py | 4 | ||||
-rw-r--r-- | netlib/http/message.py | 6 | ||||
-rw-r--r-- | netlib/http/request.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 9bf4b69d..14888ea9 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -4,7 +4,7 @@ import re import six from netlib import multidict -from netlib import utils +from netlib import strutils # See also: http://lucumr.pocoo.org/2013/7/2/the-updated-guide-to-unicode/ @@ -20,7 +20,7 @@ else: return x.decode("utf-8", "surrogateescape") def _always_bytes(x): - return utils.always_bytes(x, "utf-8", "surrogateescape") + return strutils.always_bytes(x, "utf-8", "surrogateescape") class Headers(multidict.MultiDict): diff --git a/netlib/http/message.py b/netlib/http/message.py index c51f16a2..b633b671 100644 --- a/netlib/http/message.py +++ b/netlib/http/message.py @@ -4,7 +4,7 @@ import warnings import six -from netlib import encoding, utils, basetypes +from netlib import encoding, strutils, basetypes from netlib.http import headers if six.PY2: # pragma: no cover @@ -19,7 +19,7 @@ else: return x.decode("utf-8", "surrogateescape") def _always_bytes(x): - return utils.always_bytes(x, "utf-8", "surrogateescape") + return strutils.always_bytes(x, "utf-8", "surrogateescape") class MessageData(basetypes.Serializable): @@ -200,7 +200,7 @@ class Message(basetypes.Serializable): replacements = 0 if self.content: with decoded(self): - self.content, replacements = utils.safe_subn( + self.content, replacements = strutils.safe_subn( pattern, repl, self.content, flags=flags ) replacements += self.headers.replace(pattern, repl, flags) diff --git a/netlib/http/request.py b/netlib/http/request.py index 890cf593..91d5f020 100644 --- a/netlib/http/request.py +++ b/netlib/http/request.py @@ -7,7 +7,7 @@ from six.moves import urllib from netlib import encoding from netlib import multidict -from netlib import utils +from netlib import strutils from netlib.http import multipart from netlib.http import cookies from netlib.http import headers as nheaders @@ -67,7 +67,7 @@ class Request(message.Message): """ # TODO: Proper distinction between text and bytes. c = super(Request, self).replace(pattern, repl, flags) - self.path, pc = utils.safe_subn( + self.path, pc = strutils.safe_subn( pattern, repl, self.path, flags=flags ) c += pc |