aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cana.cabal18
-rw-r--r--package.yaml1
-rw-r--r--src/Cana/Protocol.hs4
3 files changed, 9 insertions, 14 deletions
diff --git a/Cana.cabal b/Cana.cabal
index c216625..d09fbf2 100644
--- a/Cana.cabal
+++ b/Cana.cabal
@@ -6,13 +6,12 @@ cabal-version: 1.12
name: Cana
version: 0.1.0.0
-description: Please see the README on GitHub at <https://github.com/githubuser/Cana#readme>
-homepage: https://github.com/githubuser/Cana#readme
-bug-reports: https://github.com/githubuser/Cana/issues
-author: Author name here
-maintainer: example@example.com
-copyright: 2021 Author name here
-license: BSD3
+description: Project Gemini server implementation, see the README for more details.
+homepage: https://git.kingdread.de/cgit.cgi/Cana/about/
+author: Daniel Schadt
+maintainer: Daniel Schadt
+copyright: 2021 Daniel Schadt
+license: BSD-3
license-file: LICENSE
build-type: Simple
extra-source-files:
@@ -21,7 +20,7 @@ extra-source-files:
source-repository head
type: git
- location: https://github.com/githubuser/Cana
+ location: https://git.kingdread.de/cgit.cgi/Cana
flag static
manual: True
@@ -54,7 +53,6 @@ library
, text
, tls
, transformers
- , utf8-string
, x509
, x509-store
default-language: Haskell2010
@@ -80,7 +78,6 @@ executable Cana-exe
, text
, tls
, transformers
- , utf8-string
, x509
, x509-store
if flag(static)
@@ -114,7 +111,6 @@ test-suite Cana-test
, text
, tls
, transformers
- , utf8-string
, x509
, x509-store
default-language: Haskell2010
diff --git a/package.yaml b/package.yaml
index ae262e1..6aa5a3c 100644
--- a/package.yaml
+++ b/package.yaml
@@ -35,7 +35,6 @@ dependencies:
- text
- process
- stringsearch
-- utf8-string
library:
source-dirs: src
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