Title: receiveHTTP does not preprocess the incoming URI before it is parsed · Issue #76 · haskell/HTTP · GitHub
Open Graph Title: receiveHTTP does not preprocess the incoming URI before it is parsed · Issue #76 · haskell/HTTP
X Title: receiveHTTP does not preprocess the incoming URI before it is parsed · Issue #76 · haskell/HTTP
Description: Because of the strict parsing of URIs by Network.URI.parseURIReference, parseRequestHead fails on this "almost valid" URI: ghci> parseRequestHead ["GET http://fonts.googleapis.com/css?family=Roboto:300|Open+Sans:700|Open+Sans:300&lang=en...
Open Graph Description: Because of the strict parsing of URIs by Network.URI.parseURIReference, parseRequestHead fails on this "almost valid" URI: ghci> parseRequestHead ["GET http://fonts.googleapis.com/css?family=Roboto...
X Description: Because of the strict parsing of URIs by Network.URI.parseURIReference, parseRequestHead fails on this "almost valid" URI: ghci> parseRequestHead ["GET http://fonts.googleapis.com...
Opengraph URL: https://github.com/haskell/HTTP/issues/76
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"receiveHTTP does not preprocess the incoming URI before it is parsed","articleBody":"Because of the strict parsing of URIs by Network.URI.parseURIReference, parseRequestHead fails on this \"almost valid\" URI:\n\n```\nghci\u003e parseRequestHead [\"GET http://fonts.googleapis.com/css?family=Roboto:300|Open+Sans:700|Open+Sans:300\u0026lang=en HTTP/1.1\"]\nghci\u003e Left (ErrorParse \"parseRequestHead Request command line parse failure: GET http://fonts.googleapis.com/css?family=Roboto:300|Open+Sans:700|Open+Sans:300\u0026lang=en HTTP/1.1\")\n```\n\nReplacing the pipe characters with %7C allows the URI to parse.\n\nreceiveHTTP, or maybe parseRequestHead, should probably try to escape the characters that are considered invalid for URIs, before sending the string through parseURIReference.\n\nIn that regard, `escapeURIString isAllowedInURI` from Network.URI may be handy.\n\n(Something about \"be conservative in what you send, be liberal in what you accept\" prompted me to raise this issue.)\n","author":{"url":"https://github.com/zkf","@type":"Person","name":"zkf"},"datePublished":"2014-09-04T13:19:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/76/HTTP/issues/76"}
| 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:a2a14b86-d0da-e536-67ac-419e80d2a1fc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8DF4:1D83:48F7A23:644CA0E:698CE36A |
| html-safe-nonce | 9d42e183e7312dd0f8981d76e61fb361cf85aafc04560fa30dd944386f4ff700 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REY0OjFEODM6NDhGN0EyMzo2NDRDQTBFOjY5OENFMzZBIiwidmlzaXRvcl9pZCI6IjY0NjkzMTEyMDczODM1NTY5NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 708da35b152c698a45142354156d6d76675b7f49de6e9fe6c7ad35db645e5826 |
| hovercard-subject-tag | issue:41935571 |
| 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/haskell/HTTP/76/issue_layout |
| twitter:image | https://opengraph.githubassets.com/13fb58d3142061f1a6a37cac01d15495a47d28e1edc3bc9c203d3fc4e4b0bc05/haskell/HTTP/issues/76 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/13fb58d3142061f1a6a37cac01d15495a47d28e1edc3bc9c203d3fc4e4b0bc05/haskell/HTTP/issues/76 |
| og:image:alt | Because of the strict parsing of URIs by Network.URI.parseURIReference, parseRequestHead fails on this "almost valid" URI: ghci> parseRequestHead ["GET http://fonts.googleapis.com/css?family=Roboto... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zkf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/haskell/HTTP git https://github.com/haskell/HTTP.git |
| octolytics-dimension-user_id | 450574 |
| octolytics-dimension-user_login | haskell |
| octolytics-dimension-repository_id | 1039256 |
| octolytics-dimension-repository_nwo | haskell/HTTP |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1039256 |
| octolytics-dimension-repository_network_root_nwo | haskell/HTTP |
| 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 | 3d444f0a47beeeac94cddbb51c91ab408befe8d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width