Commit 7dc81b6
committed
fix: skip IDNA encoding for IP hosts in URL.to_uri
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.1 parent 978f2e6 commit 7dc81b6
2 files changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1667 | 1667 | | |
1668 | 1668 | | |
1669 | 1669 | | |
1670 | | - | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1675 | 1680 | | |
1676 | 1681 | | |
1677 | 1682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1135 | 1144 | | |
1136 | 1145 | | |
1137 | 1146 | | |
| |||
0 commit comments