Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ysbaddaden/http2
HTTP/2 Protocol Implementation for the Crystal Language
https://github.com/ysbaddaden/http2
crystal hpack http http2
Last synced: 9 days ago
JSON representation
HTTP/2 Protocol Implementation for the Crystal Language
- Host: GitHub
- URL: https://github.com/ysbaddaden/http2
- Owner: ysbaddaden
- License: other
- Created: 2016-02-13T23:22:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-21T12:35:59.000Z (over 4 years ago)
- Last Synced: 2024-08-01T17:35:41.123Z (3 months ago)
- Topics: crystal, hpack, http, http2
- Language: Crystal
- Size: 146 KB
- Stars: 95
- Watchers: 11
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - http2 - HTTP/2 Protocol Implementation (HTTP)
- awesome-crystal - http2 - HTTP/2 Protocol Implementation (HTTP)
- awesome-crystal - http2 - HTTP/2 Protocol Implementation (HTTP)
README
# HTTP
A pure Crystal (but incomplete) implementation of the HTTP/2 protocol.
Requires OpenSSL 1.1 or above to support ALPN protocol negotiation, which is
required for HTTP/2 over secure connections.## TODO
- [x] HPACK (including DH compression)
- [x] HTTP/2 connection, streams, frames, ...
- [x] HTTP/2 flow control (in/out, whole-connection, per-stream)
- [ ] HTTP/2 priority
- [x] support HTTP/2 server connections
- [x] ~~integrate transparently into `HTTP::Server`~~ (broken)
- [ ] ~~integrate into `HTTP::Server::Context` (http version, server-push)~~
- [x] support HTTP/2 client connections
- [ ] ~~integrate into `HTTP::Client`~~- [x] HPACK tests (HTTP/2 protocol, ...)
- [ ] HTTP/2 server unit tests (HTTP/2 protocol, ...)
- [ ] HTTP/2 client unit tests (HTTP/2 protocol, ...)
- [x] h2spec## Tests
Build and run the `bin/server` server, then launch
[h2spec](https://github.com/summerwind/h2spec/releases).```sh
$ make bin/server
```Test against HTTP:
```
$ bin/server
$ ./h2spec -p 9292 -S
```Test against HTTPS:
```sh
$ TLS=true bin/server
$ ./h2spec -p 9292 -k -t -S
```## RFC
### HTTP/2
- rfc7540 HTTP/2
- rfc7541 HPACK Header Compression for HTTP/2### HTTP/1
- rfc1945 HTTP/1.0 (informational)
- rfc2616 HTTP/1.1 (obsolete)
- rfc7230 HTTP/1.1 Message Syntax and Routing
- rfc7231 HTTP/1.1 Semantics and Content
- rfc7232 HTTP/1.1 Conditional Requests
- rfc7233 HTTP/1.1 Range Requests
- rfc7234 HTTP/1.1 Caching
- rfc7235 HTTP/1.1 Authentification