aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2021-06-30 13:21:01 +0200
committerDaniel Schadt <kingdread@gmx.de>2021-06-30 13:21:01 +0200
commit84585b7a7e8f1ad1d89f1e5c0aa4f6e823316621 (patch)
treef23859b0977534ecd752ac4e63c21d0cf79a28a4 /src
parent8fe5dc12dc0c9fd63d5af4f49879dbf0d6f9eab3 (diff)
downloadCana-84585b7a7e8f1ad1d89f1e5c0aa4f6e823316621.tar.gz
Cana-84585b7a7e8f1ad1d89f1e5c0aa4f6e823316621.tar.bz2
Cana-84585b7a7e8f1ad1d89f1e5c0aa4f6e823316621.zip
Get rid of utf8-string
Turns out that Char8.unpack is enough for our purposes, so we don't need the utf8-string module.
Diffstat (limited to 'src')
-rw-r--r--src/Cana/Protocol.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Cana/Protocol.hs b/src/Cana/Protocol.hs
index 1a5f48e..be80f21 100644
--- a/src/Cana/Protocol.hs
+++ b/src/Cana/Protocol.hs
@@ -43,8 +43,8 @@ import Data.Char
import Data.String
import Text.Read
import qualified Data.ByteString.Lazy as B
+import qualified Data.ByteString.Lazy.Char8 as C
import Data.ByteString.Lazy.Search
-import qualified Data.ByteString.Lazy.UTF8 as UTF
import Data.ByteString.Builder
import Data.X509 (CertificateChain)
import Network.URI
@@ -222,7 +222,7 @@ parseResponse text = do
header = fromMaybe header' $ B.stripSuffix headerDelim header'
(code, meta') = B.break (== codeDelim) header
meta = B.dropWhile (== codeDelim) meta'
- statusCode <- readMaybe (UTF.toString code) >>= fromInt
+ statusCode <- readMaybe (C.unpack code) >>= fromInt
return GeminiResponse
{ responseStatus = statusCode
, responseMeta = meta