You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[nix-shell:~/]$ ghci
GHCi, version 9.0.2: https://www.haskell.org/ghc/ :? for help
ghci> import Data.Text
ghci> import Text.URI
ghci> Right u = mkURI (pack "https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet")
ghci> render u
"https://mybusinessbusinessinformation.googleapis.com/v1/categories%3abatchGet"
This gives issues with f.e. Google, which uses colons in paths but does not accept the percent-encoded variant.
The text was updated successfully, but these errors were encountered:
RFC 3986 is quite dense. It looks like unless a URI is a "Relative Reference" (basically it is something without a scheme), then : is allowed in path segments. Otherwise it is forbidden in the very first segment, which makes sense because in that case the prefix (everything before :) could start looking like a scheme 🤔
Frankly, I think it is admissible to just allow : to be unescaped. I may get to doing it myself, but you are welcome to open a PR if you want to speed things up.
Version:
modern-uri-0.3.4.4
(also occurs on older)Colons in path pieces are percent-encoded, while it seems to me from https://www.rfc-editor.org/rfc/rfc3986#section-3.3 that they can appear unencoded from the second path piece on.
This gives issues with f.e. Google, which uses colons in paths but does not accept the percent-encoded variant.
The text was updated successfully, but these errors were encountered: