packages feed

gemcap 0.1.0 → 0.1.0.1

raw patch · 5 files changed

+19/−19 lines, 5 filesdep ~bytestringdep ~hspecdep ~tlsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytestring, hspec, tls

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,6 @@ # Changelog for gemcap -## Unreleased changes+## 0.1.0.1++- updated underlying libraries to more current versions+- fixed a bug that would cause the server to crash when the client aborted the handshake by rejecting the key
README.md view
@@ -16,11 +16,6 @@ License along with this program.  If not, see <https://www.gnu.org/licenses/>. -## Important Note--This project is not yet ready for release. Everything within it should-be considered unstable and subject to change at any time.- ## Executive Summary  This library is inspired very heavily by the@@ -28,3 +23,8 @@ package, but does not need to be linked against OpenSSL. Instead, it uses [tcp-streams](https://hackage.haskell.org/package/tcp-streams) to provide TLS functionality.++## Pull Requests++Pull requests welcome.  That said, please make your pull requests to+the `dev` branch.
gemcap.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack  name:           gemcap-version:        0.1.0+version:        0.1.0.1 synopsis:       a simple Gemini capsule (server) description:    a simple Gemini capsule (server) - see README.md for details category:       Gemini@@ -34,12 +34,12 @@   ghc-options: -Wall   build-depends:       base >=4.7 && <5-    , bytestring >=0.10.12.0 && <0.11+    , bytestring >=0.11.3.1 && <0.12     , io-streams     , network     , tcp-streams >=1.0.1.1 && <1.1     , text >=1.2.4.1 && <1.3-    , tls+    , tls >=1.5.8 && <1.6     , transformers     , x509   default-language: Haskell2010@@ -58,14 +58,14 @@   ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N   build-depends:       base >=4.7 && <5-    , bytestring >=0.10.12.0 && <0.11+    , bytestring >=0.11.3.1 && <0.12     , gemcap-    , hspec >=2.7.10 && <2.8+    , hspec >=2.9.7 && <2.10     , io-streams     , network     , tcp-streams >=1.0.1.1 && <1.1     , text >=1.2.4.1 && <1.3-    , tls+    , tls >=1.5.8 && <1.6     , transformers     , x509   default-language: Haskell2010
src/Network/Gemini/Capsule.hs view
@@ -31,7 +31,7 @@ ) where  import Control.Concurrent (forkIO)-import Control.Exception (IOException, try)+import Control.Exception (SomeException, try) import Control.Exception.Base (bracket, finally) import Control.Monad (void) import qualified Data.Connection as C@@ -72,7 +72,7 @@   certRef <- newIORef Nothing   let params' = adjustServerParams certRef params   try (accept params' sock) >>= \case-    Left (_::IOException) -> return ()+    Left (_::SomeException) -> return ()     Right conn            -> void $ forkIO $ finally       (readIORef certRef >>= runConnection conn handler)       (C.close conn)
src/Network/Gemini/Capsule/Encoding.hs view
@@ -147,14 +147,11 @@ encodeGemResponse :: GemResponse -> BSL.ByteString encodeGemResponse resp = let   code = respStatus resp-  high = code `div` 10-  low  = code `mod` 10   meta = respMeta resp   body = fromMaybe "" $ respBody resp    builder-    =  word8Dec high-    <> word8Dec low+    =  word8Dec code     <> charUtf8 ' '     <> stringUtf8 meta     <> stringUtf8 "\r\n"