Title: Non-numeric port parsing issue · Issue #180 · python-hyper/hyperlink · GitHub
Open Graph Title: Non-numeric port parsing issue · Issue #180 · python-hyper/hyperlink
X Title: Non-numeric port parsing issue · Issue #180 · python-hyper/hyperlink
Description: The port number in the following URL is clearly malformed, but Hyperlink does this: >>> hyperlink.URL.from_text("http://example.com: -໑_1\v").port -11 This comes from the fact that ports are parsed with int. This leads to the following u...
Open Graph Description: The port number in the following URL is clearly malformed, but Hyperlink does this: >>> hyperlink.URL.from_text("http://example.com: -໑_1\v").port -11 This comes from the fact that ports are parsed...
X Description: The port number in the following URL is clearly malformed, but Hyperlink does this: >>> hyperlink.URL.from_text("http://example.com: -໑_1\v").port -11 This comes from the fact th...
Opengraph URL: https://github.com/python-hyper/hyperlink/issues/180
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Non-numeric port parsing issue","articleBody":"The port number in the following URL is clearly malformed, but Hyperlink does this:\r\n```python3\r\n>>> hyperlink.URL.from_text(\"http://example.com: -໑_1\\v\").port\r\n-11\r\n```\r\nThis comes from the fact that ports are parsed with `int`. This leads to the following unintuitive consequences:\r\n - Whitespace, including all of `(' ', '\\t', '\\v', '\\r', '\\n')` (plus a bunch of unicode whitespace) will be stripped and from either side of the port number.\r\n - `'-'` or `'+'` can appear just before the first digit in the port number\r\n - `'_'` can appear between digits in the port number\r\n - Some unicode digits, such as `'໑'` can appear in port numbers\r\nAll of this violates both the RFC and the WHATWG standard.","author":{"url":"https://github.com/kenballus","@type":"Person","name":"kenballus"},"datePublished":"2023-02-07T21:38:52Z","url":"https://github.com/python-hyper/hyperlink/issues/180"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fb1f4efc-e254-a4e9-8831-823f75aa2e5c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E366:140253:B912DA:103AD63:6B06E7B5 |
| html-safe-nonce | 572b34c42773220359254fc6788dae8ea96456b70a2959cdc9ead6bfc8f87eb1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzY2OjE0MDI1MzpCOTEyREE6MTAzQUQ2Mzo2QjA2RTdCNSIsInZpc2l0b3JfaWQiOiI1MzYzMzI4MzUyNDA3NDQ3NDc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 633237bb2b89ae4268ee3374d406a82e9c8af2a4cdbaaf8b9980562e20698a82 |
| hovercard-subject-tag | issue:1575058535 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-hyper/hyperlink/180/issue_layout |
| twitter:image | https://opengraph.githubassets.com/002a06377f1c6e776c32c9e11bc82c2c340b3f38cbc67cca8fa9a75d80f7808a/python-hyper/hyperlink/issues/180 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/002a06377f1c6e776c32c9e11bc82c2c340b3f38cbc67cca8fa9a75d80f7808a/python-hyper/hyperlink/issues/180 |
| og:image:alt | The port number in the following URL is clearly malformed, but Hyperlink does this: >>> hyperlink.URL.from_text("http://example.com: -໑_1\v").port -11 This comes from the fact that ports are parsed... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kenballus |
| hostname | github.com |
| expected-hostname | github.com |
| None | 351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b |
| turbo-cache-control | no-preview |
| go-import | github.com/python-hyper/hyperlink git https://github.com/python-hyper/hyperlink.git |
| octolytics-dimension-user_id | 13035907 |
| octolytics-dimension-user_login | python-hyper |
| octolytics-dimension-repository_id | 82321340 |
| octolytics-dimension-repository_nwo | python-hyper/hyperlink |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82321340 |
| octolytics-dimension-repository_network_root_nwo | python-hyper/hyperlink |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | af8913cd0f2f77c41796be449ac66a9108825abc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width