Skip to content

Commit 79a7213

Browse files
m-burstwebknjaz
authored andcommitted
Fix backport of redirect URL fix to 3.5 (#3615)
1 parent 74e3d74 commit 79a7213

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aiohttp/web_exceptions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def __init__(self,
163163
raise ValueError("HTTP redirects need a location to redirect to.")
164164
super().__init__(headers=headers, reason=reason,
165165
body=body, text=text, content_type=content_type)
166-
self.location = URL(location)
167-
self.headers['Location'] = str(self.location)
166+
self.headers['Location'] = str(URL(location))
167+
self.location = location
168168

169169

170170
class HTTPMultipleChoices(_HTTPMove):

0 commit comments

Comments
 (0)