File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -163,17 +163,17 @@ async def run_dispatcher(
163163
164164 # TODO: Get HTTP URL from `http_pathname` and `http_query_string`
165165 parsed_url = urllib .parse .urlparse (scope ["path" ])
166+ pathname = parsed_url .path
167+ query_string = f"?{ parsed_url .query } " if parsed_url .query else ""
166168
167169 await serve_layout (
168170 Layout ( # type: ignore
169171 ConnectionContext (
170172 component (),
171173 value = Connection (
172174 scope = scope ,
173- # TODO: Rename `search` to `query_string`
174175 location = Location (
175- parsed_url .path ,
176- f"?{ parsed_url .query } " if parsed_url .query else "" ,
176+ pathname = pathname , query_string = query_string
177177 ),
178178 carrier = {
179179 "scope" : scope ,
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ class Location:
3535 pathname : str
3636 """the path of the URL for the location"""
3737
38- search : str
39- """A search or query string - a '?' followed by the parameters of the URL.
38+ query_string : str
39+ """HTTP query string - a '?' followed by the parameters of the URL.
4040
4141 If there are no search parameters this should be an empty string
4242 """
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ def ShowRoute():
124124 Location ("/another/something/file.txt" , "?key=value" ),
125125 Location ("/another/something/file.txt" , "?key1=value1&key2=value2" ),
126126 ]:
127- await display .goto (loc .pathname + loc .search )
127+ await display .goto (loc .pathname + loc .query_string )
128128 await poll_location .until_equals (loc )
129129
130130
You can’t perform that action at this time.
0 commit comments