Skip to content

Latest commit

 

History

History
204 lines (122 loc) · 10 KB

CHANGELOG.md

File metadata and controls

204 lines (122 loc) · 10 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.10.2] - 2024-03-19

Fixed

  • Added double quote to the list of allowed characters in headers.

[0.10.1] - 2024-03-17

Changed

  • Optionally abort the connection instead of performing a graceful shutdown after handling all requests.

Fixed

  • Fixed compilation errors when enabling "defmt" feature.

[0.10.0] - 2024-03-10

Breaking

  • Several public types have changed name to improve name consistency.
  • Sealed RequestHandler, MethodHandler, and PathRouter, and added RequestHandlerService and PathRouterService which have better ergonomics.
    • A service with no path parameters now has path parameters of () not NoPathParameters.
    • A service with a single path parameter now has path parameters of (T,), not OnePathParameter.
    • A service with multiple path parameters now has a tuple of path parameters, not ManyPathParameters.
  • Moved Status Code constants to inside StatusCode.
  • FromRequest and FromRequestParts are now generic over the lifetime of the request, allowing them to borrow from the request.
  • Logging using the log crate is only enabled if the log feature is enabled

Added

  • Added from_request and from_request_parts as convenience for PathRouters, and added RequestHandlerServices which borrow from Requests, which is now permitted.
  • Added support for percent-encoding in headers.
  • If the defmt feature is enabled:
    • All public type which implement Debug also implement defmt::Format
    • Logging is done using defmt

[0.9.1] - 2024-02-12

Added

  • File now has optional headers, allowed for fixed headers to be declared per file
  • Content is implemented for Vec<u8> and String behind the alloc feature

[0.9.0] - 2024-02-12

Breaking

Changes

  • Request Bodies can not be either read into the internal buffer (as previously), or converted into a RequestBodyReader, which implements Read.

Added

  • Added several unit tests around routing and reading requests.

[0.8.1] - 2024-02-05

Changes

  • Fixed newline in WebSocketKeyHeaderMissing message.

[0.8.0] - 2024-02-05

Breaking

Changes

  • The socket is now shut down after it has finished handling requests

Added

  • Added support for embassy with the embassy feature.

[0.7.2] - 2024-02-05

Changes

  • Using const_sha from crates.io (rather than copied into this repository) as it now has no_std support

[0.7.1] - 2024-01-24

Changes

[0.7.0] - 2024-01-20

Fixed

  • The "Connection" header is no longer sent in duplicate if the handler has already sent it

Changes

  • The handling of the "Connection" header in the request has changed:
    • If picoserve has been configured to always close the connection after responding, set the "Connection" header to "close".
      • This is the default, overide by calling keep_connection_alive on Config.
    • If not:
      • If the "Connection" header is missing, then check the HTTP version. If the HTTP version is equal to "HTTP/1.1", then keep the connection alive, else close the connection.
      • If the "Connection" header is "close", close the connection.
      • If the "Connection" header is a comma separated list and one of the entries is "upgrade", such as a websocket upgrade, close the connection after handling the response. Either the handler will handle the upgrade, setting the "Connection" header, in which case it will not also be automatically sent, or something has gone wrong, and the connection should be closed. Also, an upgraded connection, which is thus no longer HTTP, should be closed after completion, not reused.
        • Note that the connection is closed after the "response" has been sent. In the case of websockets, sending the "response" includes sending messages to the client and also parsing incoming messages, so this is fine.
  • The title of the web_sockets example has been changed from "Server-Sent Events" to "Websockets"
  • Frame, Control, Data, and Message in response::ws now implement Debug

[0.6.0] - 2024-01-02

Breaking

  • Changed Config structure
    • Moved timeouts to separate structure
    • Added connection field, describing behaviour after the response has been sent
  • Defaults to closing connection after the response has been sent
    • To preserve previous behaviour, which requires multiple concurrent sockets accepting connections, call keep_connection_alive on Config

Changes

  • Allow configuration of behaviour after the response has been sent, i.e. should the TCP connection be closed or kept alive?
    • If the request does not include the "Connection" header or it is set to "close", the response includes a header of "Connection: close", and the connection is closed after the response has been sent. Otherwise, the response includes a header of "Connection: keep-alive", and the connection is kept alive after the response has been sent, allowing additional requests to be made on the same TCP connection.

[0.5.0] - 2024-01-02

picoserve now runs on stable!

Breaking

  • No longer using the async_fn_in_trait feature
  • hello_world_embassy example uses newer version of embassy (and still requires nightly rust due to embassy using feature type_alias_impl_trait)

[0.4.1] - 2023-12-23

Fixed

  • Fixed JSON serialization for empty objects and arrays

[0.4.0] - 2023-12-23

Breaking

  • Parsing Query and Form now ignores blank space between two & characters
    • This allows urls which end in ? but have no query, and urls for which there's a & after the query

[0.3.0] - 2023-12-11

Breaking

  • Config now has a field write_timeout
  • Error has an extra variant WriteTimeout

Changes

  • If write_timeout is Some(timeout) in Config, writing data to the client will fail with Error::WriteTimeout if the write times out

[0.2.3] - 2023-11-18

  • Improved documentation

[0.2.2] - 2023-11-03

Added

[0.2.1] - 2023-10-29

Fixed

  • Fixed documentation to match changes to rust version nightly-2023-10-02, changed in 0.2.0

[0.2.0] - 2023-10-29

Breaking

  • Updated embedded-io-async to 0.6.0
  • Many methods return SomeErrorType not picoserve::io::WriteAllError<SomeErrorType>
  • Now using rust nightly-2023-10-02

[0.1.2] - 2023-09-01

Added

  • Added hello_world_embassy example to README

[0.1.1] - 2023-09-01

  • First Release