Skip to content

Implement a better way of handling non-HTTP urls in client.ClientSession #2507

Closed
@webknjaz

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 https

Steps to reproduce

Query https://steamcommunity.com/mobileconf/conf or steammobile://lostauth/, or twitter://webknjaz

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions