BSD-3-Clause licensed by Alcides Viamontes Esquivel
Maintained by [email protected]
This version can be pinned in stack with:second-transfer-0.7.1.0@sha256:86e19348ae80bbaddf91a42de7b808f1677ac5fd3bda7cf85c68aab95156b97d,8614

Developer README

Introduction

This is an early-stage and very experimental library to create HTTP/2 servers using Haskell.

To see the package docs, please check the Hackage page or the file hs-src/SecondTransfer.hs.

Building and installing

You need Haskell GHC compiler installed (version 7.8.3 at least). You also need OpenSSL 1.0.2, since the ALPN feature and some very recent cypher-suites are needed by HTTP/2. this source distribution will try to find them at directory /opt/openssl-1.0.2, but you should be able to alter the options using cabal configure. This package uses Haskell’s FFI to interface with OpenSSL.

Provided that you have all the dependencies, you should be able to just do:

$ cabal install second-transfer

Running the tests

$ cabal test

Debugging complicated scenarios

To access full debugging capabilities, for example from the test suite, use the following command from the project’s directory:

$ cabal exec -- ghci -ihs-src -itests/tests-hs-src -itests/support -XCPP -Imacros/ dist/build/cbits/tlsinc.o

Example

There is a very basic example at tests/tests-hs-src/compiling_ok.hs, and a somewhat more complicated one at examples/attempt_bust; that one shows how to do HTTP/2.0 push from the library.

Development

Uploading documentation (provided you have access to the package in Hackage):

$ ./hackage-upload-docs.sh second-transfer 0.5.4.0 <hackage-user> <hackage-password>

Changes

  • 0.7.1.0 :

    • A few important memory leaks got fixed
    • Changed I/O interface to live in IOCallbacks
    • Working now around congestion window.
  • 0.6.1.0 :

    • Improved documentation.
    • Improved ALPN negotiation handling.
    • Messages with a body are now handled by the HTTP/1.1 speaking part of this library.
  • 0.6.0.0 :

    • Changed the interface to provide more information to and from workers
    • Implemented HTTP/2 push
    • Upgraded dependencies to 1.0. for http2 package
    • Extended channel interface in such a way that latency is reduced, as a result, the test suite is completely broken. Please wait for 0.6.0.1 release.
  • 0.5.5.1 :

    • Restricted HTTP2 package version.
    • Fixes #2
  • 0.5.5.0 :

    • Made HeaderEditor a Monoid instance
    • Trying to WINDOW_UPDATE an unexistent stream aborts the session, as it should
  • 0.5.4.0 :

    • Added the type HTTP500PrecursorException and corresponding test
    • Improved test suite so that requests can be simulated a little bit more easily
    • Re-export type Headers from module HTTPHeaders
  • 0.5.3.2 :

    • Added this changelog.
    • Fixed the lower limit for the time package.
    • Enforce first frame being a settings frame when receiving.
    • Added a couple of tests.