-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Implement a better way of handling non-HTTP urls in client.ClientSession #2507
Copy link
Copy link
Closed
Labels
HacktoberfestWe think it's good for https://hacktoberfest.digitalocean.com/We think it's good for https://hacktoberfest.digitalocean.com/clientenhancementneed pull request
Description
Long story short
This is a follow-up for #2479 (comment).
Currently, if one uses ClientSession and it reaches URL with custom schema the exception with insufficient metadata is being raised.
Expected behaviour
There should be some way to give control back to the caller once we reach valid URL, which we cannot follow because of unsupported schema. @asvetlov suggested to implement a custom exception for this.
Actual behaviour
ValueError: Can redirect only to http or httpsSteps to reproduce
Query https://steamcommunity.com/mobileconf/conf or steammobile://lostauth/, or twitter://webknjaz
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
HacktoberfestWe think it's good for https://hacktoberfest.digitalocean.com/We think it's good for https://hacktoberfest.digitalocean.com/clientenhancementneed pull request