From af23364db6562ed15d19290f24ded890f26a7d75 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Sat, 18 Apr 2020 17:32:59 +1200 Subject: [PATCH] Forgot to expose some necessary APIs, and fixed about: bug. --- hurl.cabal | 2 +- src/Network/URI/Fetch.hs | 4 ++-- 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) -- 2.30.2