Skip to content

v0.5.1

Choose a tag to compare

@kaitk kaitk released this 22 Oct 20:26
· 116 commits to main since this release

h2 over TLS, goose-tls's own TLS 1.3 server, and outbound sockets released when an h2
stream ends. Goose v2026.3, goose-hash v0.0.4, goose-tls v0.0.4, and
goose-compress v0.1.1.

Added:

  • h2 over TLS on both loops, chosen by ALPN: a TLS listener whose context lists h2,
    as tls::server_files(chain, key, ["h2", "http/1.1"]), serves h2 to a client that
    offers it and HTTP/1.1 to one that doesn't, on one port. No new name; a context
    that lists only http/1.1 serves as before. h2spec passes over TLS on both loops.
    The benchmark server serves it from one context on both its TLS ports, the port + 1
    and the port + 363 (8081 and 8443 beside 8080, TLS_PORT and H2_PORT), and
    serves /static/ as /files/, for HttpArena's static profiles.
  • An idle h2 connection, h2c or over TLS, is sent GOAWAY before it closes, and over
    TLS close_notify after it.
  • http::file_tag(f), the ETag that serve_file sends, which serve_file now
    calls, so a program that answers a 304 or 416 itself can match it.
  • http::take_compressed(z, coding, c), which takes and resets an encoder from the
    worker's pool, and which begin_compressed now calls once it has written the head,
    so a program that writes its own head can stream compressed.
  • http::close_file(f), which closes a File that open_file opened and the
    program won't serve, the last of open_precompressed's parts to be public.

Changed:

  • goose-tls v0.0.4: the TLS server is goose-tls's own TLS 1.3 server in Goose over
    libcrypto, 2.9 KB per idle connection where libssl held 28.5 KB, with session
    tickets; a client offering ALPN without http/1.1 now fails with
    no_application_protocol. The kTLS handoff is gone, with the benchmark server's
    KTLS=1.

Fixed:

  • On io_uring, an h2 stream reset while it waits on http::wait_socket, or answered in
    the call that waited, cancels the socket's poll, which held a socket the handler hung
    up open until its next event or the connection's close. test/outbound/ tests both
    over h2c on every loop where wait_socket works.
  • On io_uring, an HTTP/1.1 handler that answers in the call that waited on
    http::wait_socket cancels the socket's poll too.
  • An h2 stream refused with 413, for a body past Config.max_body, calls its handler
    with CLOSED when it was owed a call, as a reset does, so a socket it holds is hung
    up. test/outbound/ tests both on every loop where wait_socket works.