Skip to content
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

Question: Difference between ClientResponse.url and .real_url #3664

Closed
buhtz opened this issue Mar 25, 2019 · 3 comments
Closed

Question: Difference between ClientResponse.url and .real_url #3664

buhtz opened this issue Mar 25, 2019 · 3 comments
Labels
question StackOverflow

Comments

@buhtz
Copy link

buhtz commented Mar 25, 2019

Sorry, for using Issues as Q&A board but there was no response on the mailinglist.
X-Post: https://groups.google.com/forum/#!msg/aio-libs/ibZkny12BpM/ci7sEQjlAQAJ

My question is about ClientResponse class.

What is the difference between ClientResponse.urland ClientResponse.real_url?

I can not find any.

e.g. I tried to get this URL
https://www.fsf.org/static/fsforg/rss/news.xml
which is redirected to
https://static.fsf.org/fsforg/rss/news.xml

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

Possibly related issues are #2992 (question), #1670 (ClientResponse ergonomics), #1898 (Any difference between url and url_obj in URL), #172 (Question about ServerHttpProtocol.closing()), and #824 (URL with #).

@aio-libs-bot aio-libs-bot added the question StackOverflow label Mar 25, 2019
@buhtz
Copy link
Author

buhtz commented Mar 25, 2019

I hate bots.

@kxepal
Copy link
Member

kxepal commented Mar 26, 2019

Well, as you can see by code difference is about fragment part:
https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client_reqrep.py#L651-L652
https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client_reqrep.py#L668-L674
and that's what about documentations states on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question StackOverflow
Projects
None yet
Development

No branches or pull requests

4 participants