Async::HTTP

Async::HTTP

An asynchronous client and server implementation of HTTP/1.0, HTTP/1.1 and HTTP/2 including TLS. Support for streaming requests and responses. Built on top of async, io-endpoint and io-stream. falcon provides a rack-compatible server.

Development Status

Usage

Please browse the source code index or refer to the guides below.

Getting Started

This guide explains how to get started with Async::HTTP.

Testing

This guide explains how to use Async::HTTP clients and servers in your tests.

Releases

Please browse the releases for more details.

v0.95.0

  • Use Protocol::HTTP::RefusedError for safe retry of requests not processed by the server, including non-idempotent methods like PUT.
    • Remove Async::HTTP::Protocol::RequestFailed in favour of Protocol::HTTP::RefusedError.
    • HTTP/1: Delegate request write failure handling to protocol-http1.
    • HTTP/2: Handle GOAWAY and REFUSED_STREAM via protocol-http2, enabling automatic retry of unprocessed requests.

v0.94.3

  • Fix response body leak in HTTP/2 server when stream is reset before send_response completes (e.g. client-side gRPC cancellation). The response body's close was never called, leaking any resources tied to body lifecycle (such as rack.response_finished callbacks and utilization metrics).

v0.94.1

  • Fix defer_stop usage in HTTP1::Server, improving server graceful shutdown behavior.

v0.94.0

  • Propagate all errors from background reader to active streams so that they are closed correctly (e.g. errors are not missed).

v0.92.2

  • Better handling of trailers. If invalid trailers are received, the connection (HTTP/1) or stream (HTTP/2) is reset.

v0.92.0

  • Breaking: Remove Async::HTTP::Reference. Use Protocol::URL::Reference directly instead.

v0.91.0

  • Move all default trace providers into traces/provider/async/http.

v0.90.2

  • Don't emit resource: keyword argument in traces - it's unsupported by OpenTelemetry.

v0.88.0

v0.87.0

See Also

Contributing

We welcome contributions to this project.

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.

Running Tests

To run the test suite:

bundle exec sus

Making Releases

To make a new release:

bundle exec bake gem:release:patch # or minor or major

Developer Certificate of Origin

In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.

Community Guidelines

This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.