File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,12 @@ def port(self):
151151 return str (port )
152152
153153 def get_full_path (self , force_append_slash = False ):
154- return self ._get_full_path (self .path , force_append_slash )
154+ """
155+ Return the full path for the request, including query string.
155156
156- def _get_full_path (self , path , force_append_slash ):
157+ If force_append_slash is True, append a trailing slash if the path
158+ doesn't already end with one.
159+ """
157160 # RFC 3986 requires query string arguments to be in the ASCII range.
158161 # Rather than crash if this doesn't happen, we encode defensively.
159162
@@ -174,8 +177,8 @@ def escape_uri_path(path):
174177 return quote (path , safe = "/:@&+$,-_.!~*'()" )
175178
176179 return "{}{}{}" .format (
177- escape_uri_path (path ),
178- "/" if force_append_slash and not path .endswith ("/" ) else "" ,
180+ escape_uri_path (self . path ),
181+ "/" if force_append_slash and not self . path .endswith ("/" ) else "" ,
179182 ("?" + iri_to_uri (self .meta .get ("QUERY_STRING" , "" )))
180183 if self .meta .get ("QUERY_STRING" , "" )
181184 else "" ,
You can’t perform that action at this time.
0 commit comments