Closed Fahreeve closed 6 years ago
This is intended behavior. See #846
have I simple way how to change it back?
No response contains real URL sent to server. If you want keep unmodified version -- please save it in your own storage manually.
I don't agree with you You can see an example in this page: https://vk.com/dev/implicit_flow_user in point 3
For my library I'm using this code:
class CustomClientResponse(aiohttp.ClientResponse):
async def start(self, connection, read_until_eof=False):
await super().start(connection, read_until_eof)
headers = CIMultiDict(self.headers)
location = headers.get(hdrs.LOCATION, None)
if location is not None:
headers[hdrs.LOCATION] = location.replace('#', '?')
self.headers = CIMultiDictProxy(headers)
self.raw_headers = tuple(headers.items())
return self
Please correct me if I'm wrong: VK API does rely on fragment data and there is no way to do it via current aiohttp client API. Is it correct?
VK API does relay on fragment data
я не могу понять эту фразу на английском, но полагаю, что вы поймете меня на русском
проблема в том, что при успешной авторизации в соц. сети происходит перенаправление на адрес
https://oauth.vk.com/blank.html#access_token= 533bacf01e11f55b536a565b57531ad114461ae8736d6506a3&expires_in=86400&user_id=8492&state=123456
в версии 0.21.6 все работало, но потом я обновился до 1.0.3 и все что после #
перестало было доступным в переменных history или url объекта response
I think @asvetlov intended to say "VK API does rely on fragment data" ("VK API зависит от передачи фрагмента (части после #) браузером серверу").
@Fahreeve I believe you missed somewhere escaping of #
in URI.
Can you show the code that you use for step 1 in mentined docs, e.g. to construct URI such as this?
https://oauth.vk.com/authorize?client_id=1&display=page&redirect_uri=http://example.com/callback&scope=friends&response_type=token&v=5.59
@rutsky https://github.com/Fahreeve/aiovk/blob/master/aiovk/sessions.py#L99 it don't help you you have to use debuger in this moment https://github.com/Fahreeve/aiovk/blob/master/aiovk/sessions.py#L127 and watch out for history variable
fixed in master
Hello!
I have same problem with VK api. version 1.3.0 - I dont see fragment in result. Checked hack from @Fahreeve - it works.
@asvetlov we need to fix this sh..
is this still a problem? do we have any idea what needs to be fixed?
Close as outdated
@asvetlov you should really consider enabling stale bot integration: https://github.com/apps/stale
We can manage our all 100 open issues without bots. There are many very old ones which should stay in tracker as an appointment at least, I don't want to be very aggressive on issues rejecting
@asvetlov that bot supports ignoring issues marked with certain labels :) It's pretty configurable
You can try to setup it and let's look how things are going.
Long story short
url address of original response looks like
http://someurl.bla/test.html#access_token=blabla&ab=1
but in aiohttpresponse.url
I can see onlyhttp://someurl.bla/test.html
Expected behaviour
I want to have a full address in
response.url
Actual behaviour
response.url
has only this part:http://someurl.bla/test.html