This is a library for creating HTTP/2 servers.
To see some introductory docs, please check the Hackage page or the file hs-src/SecondTransfer.hs.
At the moment, we support both Linux and Mac OS X. We haven’t tested the library in Windows, but off the top of my head I can not think on any too Unix specific thing that we are using.
Building and installing
The preferred method of installing SecondTransfer is through Stack.
SecondTransfer uses Botan for its TLS layer, but
the default build disables the library to play nice with Stack’s build servers.
Enable it by installing Botan in your preferred location, switching on the flag
enable-botan (you can do that in your stack.yaml file) and adjusting the necessary
include directories (through
extra-lib-dirs, also in
We use a extensible TLS mechanism, so if you would rather use a recent version
of OpenSSL, look for the typeclass
TLSContext and implement it.
Running the tests
There are two sets of tests: normal Haskell tests and a custom test suite called Suite 1 that requires Stack, Python 3.4+, Redis running in localhost/standard port with DB 3 erasable, and Numpy. To run Suite 1, SecondTransfer should be compiled with the “Monitoring” flag enabled.
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.
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>
- The AwareWorker interface was modified to include prompt resource termination. That is, AwareWorkers can register finalizers for critical resources now. But this breaks backward compatibility.
- The internals pipe architecture was overhauled to have even less unbounded chans and more MVar(s) acting as channels. This should result in better behaviour regarding memory consumption.
- New tidal session manager to keep the number of connections that clients make in check.
- Added support for loading certs from memory.
- HTTP/1.1 supports chunked transfer-encodings now
- Mac build works
- All threads exceptions are reported
- Reverse proxy functionality from HTTP/2 to HTTP/1.1
- A few important memory leaks got fixed
- Changed I/O interface to live in IOCallbacks
- Working now around congestion window.
- Improved documentation.
- Improved ALPN negotiation handling.
- Messages with a body are now handled by the HTTP/1.1 speaking part of this library.
- 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.
- Restricted HTTP2 package version.
- Fixes #2
- Made HeaderEditor a Monoid instance
- Trying to WINDOW_UPDATE an unexistent stream aborts the session, as it should
- 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
- 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.