-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web.Request.clone bug #7481
Comments
That code was removed in 3.3, over 5 years ago: No idea why though... The documentation didn't get changed, so I can't tell if it was deliberate. |
Which code is removed? The problem is the url is not change only if the |
The code in the commit linked above. The scheme attribute is no longer used. |
Tho clone method has scheme and it is used. The problem is what I described above. https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest.scheme |
Yes, please look at the commit I linked. The code has been removed, it won't work. |
I don't understand. My workaround is working. So
And it is true, because I can overwrite it. The problem is the |
OK, I realise the attribute was just changed to optimise the reify decorator. But, the code seems to want the absolute URL to override: aiohttp/aiohttp/web_request.py Lines 179 to 186 in 5c3d50f
I'm not which makes more sense, either the scheme/host need to be ignored and not changed, or the absolute url needs to get updated from the scheme/host. |
Describe the bug
When I try to create a new
Request
object from an existing withclone
and set newscheme
andhost
parameters. The new request object'surl
will not change it's scheme and url.To Reproduce
Expected behavior
The new
request
object shold start with 'https://'Logs/tracebacks
Python Version
3.11
aiohttp Version
3.8.5
multidict Version
6.0.5
yarl Version
$ python -m pip show yarl
OS
macOS
Related component
Server
Additional context
Workaround:
Code of Conduct
The text was updated successfully, but these errors were encountered: