aesiniath / http-streams

Haskell HTTP client library for use with io-streams
https://hackage.haskell.org/package/http-streams
BSD 3-Clause "New" or "Revised" License
50 stars 48 forks source link

Double-escapes URLs #118

Closed singpolyma closed 3 years ago

singpolyma commented 3 years ago

Since version 0.8.6.1 the convenience actions of this library (such as get) have a bug where any escape sequence gets double-escaped. So if I ask get for http://example.com/hello%20world it will instead try to get http://example.com/hello%2520world

The culprit seems to be some code that was added to allow invalid URIs to get auto-escaped in some cases on the way in. This predicate should use isAllowedInURI instead of isUnescapedInURI