diff options
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/http/request.py | 2 | ||||
-rw-r--r-- | netlib/utils.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/netlib/http/request.py b/netlib/http/request.py index 6406a980..67aa17ce 100644 --- a/netlib/http/request.py +++ b/netlib/http/request.py @@ -162,7 +162,7 @@ class Request(Message): def path(self): """ HTTP request path, e.g. "/index.html". - Guaranteed to start with a slash. + Guaranteed to start with a slash, except for OPTIONS requests, which may just be "*". """ if self.data.path is None: return None diff --git a/netlib/utils.py b/netlib/utils.py index dda76808..ebd192f3 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -330,6 +330,8 @@ def unparse_url(scheme, host, port, path=""): Args: All args must be str. """ + if path == "*": + path = "" return "%s://%s%s" % (scheme, hostport(scheme, host, port), path) |