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
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 HTTP/1.1"]
ghci> Left (ErrorParse "parseRequestHead Request command line parse failure: GET http://fonts.googleapis.com/css?family=Roboto:300|Open+Sans:700|Open+Sans:300&lang=en HTTP/1.1")
Replacing the pipe characters with %7C allows the URI to parse.
receiveHTTP, or maybe parseRequestHead, should probably try to escape the characters that are considered invalid for URIs, before sending the string through parseURIReference.
In that regard, escapeURIString isAllowedInURI from Network.URI may be handy.
(Something about "be conservative in what you send, be liberal in what you accept" prompted me to raise this issue.)
The text was updated successfully, but these errors were encountered:
Because of the strict parsing of URIs by Network.URI.parseURIReference, parseRequestHead fails on this "almost valid" URI:
Replacing the pipe characters with %7C allows the URI to parse.
receiveHTTP, or maybe parseRequestHead, should probably try to escape the characters that are considered invalid for URIs, before sending the string through parseURIReference.
In that regard,
escapeURIString isAllowedInURI
from Network.URI may be handy.(Something about "be conservative in what you send, be liberal in what you accept" prompted me to raise this issue.)
The text was updated successfully, but these errors were encountered: