summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Cochrane <adrian@openwork.nz>2020-04-18 17:32:59 +1200
committerAdrian Cochrane <adrian@openwork.nz>2020-04-18 17:32:59 +1200
commitaf23364db6562ed15d19290f24ded890f26a7d75 (patch)
tree824d3a8d1a975b043a4523c0e6bf3a8b75b540e1
parentd40eef0356be6b5b4c38fa94a8322e9a8a37ae86 (diff)
downloadhurl-af23364db6562ed15d19290f24ded890f26a7d75.tar.gz
hurl-af23364db6562ed15d19290f24ded890f26a7d75.tar.bz2
hurl-af23364db6562ed15d19290f24ded890f26a7d75.zip
Forgot to expose some necessary APIs, and fixed about: bug.
-rw-r--r--hurl.cabal2
-rw-r--r--src/Network/URI/Fetch.hs4
2 files changed, 3 insertions, 3 deletions
diff --git a/hurl.cabal b/hurl.cabal
index 1049724..18ab494 100644
--- a/hurl.cabal
+++ b/hurl.cabal
@@ -10,7 +10,7 @@ name: hurl
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
-version: 1.4.0.0
+version: 1.4.1.0
-- A short (one-line) description of the package.
synopsis: Haskell URL resolver
diff --git a/src/Network/URI/Fetch.hs b/src/Network/URI/Fetch.hs
index b23ae2d..c5e1898 100644
--- a/src/Network/URI/Fetch.hs
+++ b/src/Network/URI/Fetch.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE OverloadedStrings #-}
-- | Retrieves documents for a URL, supporting multiple URL schemes that can be
-- disabled at build-time for reduced dependencies.
-module Network.URI.Fetch(Session, locale, newSession,
+module Network.URI.Fetch(Session(locale, aboutPages), newSession,
fetchURL, fetchURL', fetchURLs, mimeERR, htmlERR,
dispatchByMIME, saveDownload, downloadToURI) where
@@ -123,7 +123,7 @@ fetchURL' session mimes uri@(URI {uriScheme = "about:", uriPath = ""}) =
fetchURL' session mimes $ uri {uriPath = "version"}
fetchURL' Session {aboutPages = pages} _ url@URI {uriScheme = "about:", uriPath = path} =
return (url,
- Txt.unpack $ convertCharset "utf-8" $ B.toStrict $
+ Txt.unpack $ Txt.strip $ convertCharset "utf-8" $ B.toStrict $
llookup (path ++ ".mime") "text/html" pages,
Right $ llookup path "" pages)