Cory Benfield c2c39c63f6 Basic PRIORITY frame validation. (#71)
Motivation:

In the future we'll want to use PRIORITY frames to provide feedback on
how we emit data. Additionally, RFC 7540 forbids certain kinds of
PRIORITY frame, which right now we tolerate receiving. We can design a
minor PRIORITY shim to ensure that we have a code path for PRIORITY data
to be passed around, and then use this shim to enforce RFC 7540's
requirements.

Modifications:

- Added support for PRIORITY frame data inbound.
- Enforce that frames may not establish self-dependency.

Result:

Better policing of RFC 7540 constraints.
2019-03-25 18:09:46 +00:00
2018-05-17 13:11:32 +01:00
2019-02-26 21:12:47 +00:00
2017-12-04 12:13:14 +00:00
2017-12-04 12:13:14 +00:00
2018-05-17 13:32:51 +01:00

SwiftNIO HTTP/2

This project contains HTTP/2 support for Swift projects using SwiftNIO.

Please be aware that this project is currently in a beta state, and is subject to change. There are a number of current limitations in the project (see the Beta section for more details), and the API remains subject to change.

Building

swift-nio-http2 is a SwiftPM project and can be built and tested very simply:

$ swift build
$ swift test

Note, however, that you need nghttp2 installed and available to the linker. On macOS or other Darwin platforms, the easiest way to get nghttp2 is via Homebrew:

$ brew install nghttp2

For more recent Linux systems, nghttp2 may be available from your package manager. Otherwise, you may need to build it from source.

Beta

This project is currently in a beta state. The intention is to allow the wider SwiftNIO community to get early access in order to provide feedback and help guide the development of the HTTP/2 support.

The current version of these bindings has a dependency on nghttp2. This dependency is intended to be temporary: it was used to get the functionality up-and-running, but as time goes on nghttp2 should be scaled back, and eventually removed once all the functionality it provides has been replaced with Swift code.

Due to this early state, there are a number of limitations in the current bindings. Please be aware of them. The known limitations are listed below:

  1. Promises on control frame writes do not work and will be leaked. Promises on DATA frame writes work just fine and will be fulfilled correctly.
  2. No support for manual flow control window management, only automatic.
  3. No support for sending priority frames, and received priority frames will not be transmitted on the channel pipeline.
  4. No support for push promise frames, either sending or receiving.
  5. No low-level support for managing DATA frame boundaries: DATA frames may be interleaved and merged/split as necessary by nghttp2.

If you choose to use this project, please submit feedback and bug reports when you encounter problems or limitations.

Developing SwiftNIO HTTP/2

For the most part, SwiftNIO development is as straightforward as any other SwiftPM project. With that said, we do have a few processes that are worth understanding before you contribute. For details, please see CONTRIBUTING.md in this repository.

S
Description
Mirror of github.com/apple/swift-nio-http2
Readme Apache-2.0
8.7 MiB
0 Stars 1 Watchers 0 Forks
Languages
Swift 98.8%
Shell 0.8%
Python 0.2%
Ruby 0.2%