Skip to content

fix: skip IDNA encoding for IP hosts in URL.to_uri#196

Open
santhreal wants to merge 1 commit into
python-hyper:masterfrom
santhreal:fix/to-uri-ipv6-clean
Open

fix: skip IDNA encoding for IP hosts in URL.to_uri#196
santhreal wants to merge 1 commit into
python-hyper:masterfrom
santhreal:fix/to-uri-ipv6-clean

Conversation

@santhreal

Copy link
Copy Markdown

URL.to_uri hits InvalidCodepoint when IPv6 host ::1. This PR fixes the regression with a focused test covering the case. RED-GREEN proved; awaiting thermo

IPv6 literals contain colons and are already ASCII. Passing them
through idna_encode raised InvalidCodepoint for hosts like ::1.
Skip IDNA when parse_host reports an IP family.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant