PackageTrack
Sign in Get early access

shelf

A model for web server middleware that encourages composition and easy reuse.

1.4.2 1000K downloads/mo #30 most downloaded on pub.dev dart-lang/shelf

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 1.1 years

Nearly every release is documented

notes for 70 of 75 stable releases

Nothing withdrawn

no release was ever pulled

13 years old

78 releases · first in 2014

0 releases in the last 12 months

see the full history below

Release timeline

78 releases · Jan 2014 to Jun 2024
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 78
  1. 1.4.2 21 Jun 2024
    Release notes
    • Headers: added the fromEntries constructor.
    • Require http_parser: ^4.1.0
    • Require Dart ^3.4.0.
    Open source →
  2. 1.4.1 03 May 2023
    Release notes
    • Added package topics to the pubspec file.
    Open source →
  3. 1.4.0 20 Sep 2022
    Release notes
    • Add Response.unauthorized() constructor
    • Add poweredByHeader argument to serve, serveRequests, and handleRequest.
    • Require Dart >= 2.17
    Open source →
  4. 1.3.2 28 Jul 2022
    Release notes
    • shelf_io.dart
      • Started setting X-Powered-By response header to Dart with package:shelf.
      • Stopped setting Server header (with value dart:io with Shelf).
    Open source →
  5. 1.3.1 16 Jun 2022
    Release notes
    • Update the pubspec repository field.
    Open source →
  6. 1.3.0 28 Mar 2022
    Release notes
    • Add Response.badRequest() constructor
    • Deprecate ServerHandler.
    • Require Dart >= 2.16
    Open source →
  7. 1.2.0 08 Jul 2021
    Release notes
    • Added MiddlewareExtensions which provides addMiddleware and addHandler to Middleware instances. Provides easier access to the composition capabilities offered by Pipeline.
    Open source →
  8. 1.1.4 13 May 2021
    Release notes
    • Support analyzer: '^10.0.0'
    Open source →
    Release notes
    • Documentation improvements.
    Open source →
  9. 1.1.3 13 May 2021
    Release notes
    • Require analyzer: ^8.1.1
    • Require build: ^4.0.0
    • Require build_config: ^1.2.0
    • Require source_gen: ^4.0.1
    • Require sdk: ^3.9.0
    Open source →
    Release notes
    • Automatically remove content-length header from a Response.notModified. Restores some of the safety around malformed requests that was removed in 1.1.2 where we started allowing content-length for some responses without bodies.
    • Documentation cleanup.
    Open source →
  10. 1.1.2 07 May 2021
    Release notes
    • Require analyzer: '>=7.4.0 <9.0.0'
    • Require build: ^3.0.0
    • Require build_config: ^1.1.0
    • Require source_gen: ^3.0.0
    • Require sdk: ^3.7.0
    Open source →
    Release notes
    • Allow an explicit non-zero content-length header if the body is empty. (Needed to correctly support HEAD requests).
    Open source →
  11. 1.1.1 23 Apr 2021
    Release notes
    • Support the latest package:analyzer and package:source_gen
    • Require sdk: ^3.3.0
    Open source →
    Release notes
    • Avoid wrapping response bodies that already contained List<int> or Stream<List<int>> in a CastList/CastStream to improve performance.
    Open source →
  12. 1.1.0 17 Mar 2021
    Release notes
    • Change Request.hijack return type from void to Never. This may cause analysis hints in packages using this method, but is not actually breaking for apps.
    Open source →
  13. 1.0.0 05 Feb 2021
    Release notes
    • Stable null safety release.
    Open source →
  14. 1.0.0-nullsafety.0 29 Jan 2021 pre-release
    Release notes
    • Update to support Dart null-safety.
    • Updated the change function on Request and Response to clear existing values in context if the provided context value has null values.
    Open source →
  15. 0.7.9 14 Aug 2020
    Release notes
    • Allow a handlerPath to lead up to a double // in a URI.
    Open source →
  16. 0.7.8 12 Aug 2020
    Release notes
    • Handle malformed URLs (400 instead of 500).
    Open source →
  17. 0.7.7 19 Jun 2020
    Release notes
    • Fix internal error in Request when .change() matches the full path.
    Open source →
  18. 0.7.6 18 Jun 2020
    Release notes
    • Supports multiple header values in Request and Response:
      • headersAll field contains all the header values
      • headers field contains the same values as previously (appending values with ,)
      • headers parameter in the constructor and in the .change() method accepts both String and List<String> values.
    Open source →
  19. 0.7.5 01 Apr 2019
    Release notes
    • Return the correct HTTP status code for badly formatted requests.
    Open source →
  20. 0.7.4 17 Dec 2018
    Release notes
    • Allow passing shared parameter to underlying HttpServer.bind calls via shelf_io.serve.
    • Correctly pass encoding in Response constructors forbidden, notFound, and internalServerError.
    • Update README.md to point to latest docs.
    Open source →
  21. 0.7.4+1 27 Mar 2019
    Release notes
    • Allow stream_channel version 2.x
    Open source →
  22. 0.7.3 02 May 2018
    Release notes
    • Fix some Dart 2 runtime errors.
    Open source →
  23. 0.7.3+1 22 May 2018
    Release notes
    • Updated SDK version to 2.0.0-dev.55.0.
    Open source →
  24. 0.7.3+2 10 Jul 2018
    Release notes
    • Fix constant evaluation analyzer error in shelf_unmodifiable_map.dart.

    • Update usage of HTTP constants from the Dart SDK. Now require 2.0.0-dev.61.

    Open source →
  25. 0.7.3+3 16 Jul 2018
    Release notes
    • Set max SDK version to <3.0.0, and adjust other dependencies.
    Open source →
  26. 0.7.2 04 Jan 2018
    Release notes
    • Update createMiddleware arguments to use FutureOr.

      • Note: this change is not breaking for the runtime behavior, but it might cause new errors during static analysis due the the type changes.
    • Updated minimum Dart SDK to 1.24.0, which added FutureOr.

    • Improved formatting of the logRequests default logger.

    Open source →
  27. 0.7.1 26 Oct 2017
    Release notes
    • The shelf_io server now adds a shelf.io.connection_info field to Request.context, which provides access to the underlying HttpConnectionInfo object.
    Open source →
  28. 0.7.0 29 Aug 2017
    Release notes
    • Give a return type to the Handler typedef. This may cause static warnings where there previously were none, but all handlers should have already been returning a Response or Future<Response>.

    • Remove HijackCallback and OnHijackCallback typedefs.

    • Breaking: Change type of onHijack in the Request constructor to take an argument of StreamChannel.

    Open source →
  29. 0.6.8 23 Jun 2017
    Release notes
    • Add a securityContext parameter to self_io.serve().
    Open source →
  30. 0.6.7 26 Oct 2016
    Release notes
    • Add Request.isEmpty and Response.isEmpty getters which indicate whether a message has an empty body.

    • Don't automatically generate Content-Length headers on messages where they may not be allowed.

    • User-specified Content-Length headers now always take precedence over automatically-generated headers.

    Open source →
  31. 0.6.7+1 26 Oct 2016
    Release notes
    • Never auto-generate a Content-Length header.
    Open source →
  32. 0.6.7+2 06 Dec 2016
    Release notes
    • Go back to auto-generating a Content-Length header when the length is known ahead-of-time and the user hasn't explicitly specified a Transfer-Encoding: chunked.

    • Clarify adapter requirements around transfer codings.

    • Make shelf_io consistent with the clarified adapter requirements. In particular, it removes the Transfer-Encoding header from chunked requests, and it doesn't apply additional chunking to responses that already declare Transfer-Encoding: chunked.

    Open source →
  33. 0.6.6 24 Oct 2016
    Release notes
    • Allow List<int>s to be passed as request or response bodies.

    • Requests and responses now automatically set Content-Length headers when the body length is known ahead of time.

    • Work around sdk#27660 by manually setting HttpResponse.chunkedTransferEncoding to false for requests known to have no content.

    Open source →
  34. 0.6.5 28 Jan 2016
    Release notes
    • Request.hijack() now takes a callback that accepts a single StreamChannel argument rather than separate Stream and StreamSink arguments. The old callback signature is still supported, but should be considered deprecated.

    • The HijackCallback and OnHijackCallback typedefs are deprecated.

    Open source →
  35. 0.6.5+1 04 May 2016
    Release notes
    • Fix all strong-mode warnings and errors.
    Open source →
  36. 0.6.5+2 05 May 2016
    Release notes
    • Support http_parser 3.0.0.
    Open source →
  37. 0.6.5+3 25 Aug 2016
    Release notes
    • Improve the documentation of logRequests().
    Open source →
  38. 0.6.4 26 Oct 2015
    Release notes
    • Add a Server interface representing an adapter that knows its own URL.

    • Add a ServerHandler class that exposes a Server backed by a Handler.

    • Add an IOServer class that implements Server in terms of dart:io's HttpServer.

    Open source →
  39. 0.6.4+1 28 Oct 2015
    Release notes
    • When the shelf_io adapter detects an error, print the request context as well as the error itself.
    Open source →
  40. 0.6.4+2 18 Nov 2015
    Release notes
    • Fix a bug where the Content-Type header didn't interact properly with the encoding parameter for new Request() and new Response() if it wasn't lowercase.
    Open source →
  41. 0.6.4+3 14 Dec 2015
    Release notes
    • Support http_parser 2.0.0.
    Open source →
  42. 0.6.3 01 Sep 2015
    Release notes
    • Messages returned by Request.change() and Response.change() are marked read whenever the original message is read, and vice-versa. This means that it's possible to read a message on which change() has been called and to call change() on a message more than once, as long as read() is called on only one of those messages.
    Open source →
  43. 0.6.3+1 21 Oct 2015
    Release notes
    • Cleaned up handling of certain Map instances and related dependencies.
    Open source →
  44. 0.6.2 06 Jul 2015
    Release notes
    • Added a body named argument to change method on Request and Response.
    Open source →
  45. 0.6.2+1 26 Aug 2015
    Release notes
    • Support http_parser 1.0.0.
    Open source →
  46. 0.6.1 25 Mar 2015
    Release notes
    • shelf_io now takes a "shelf.io.buffer_output" Response.context parameter that controls HttpResponse.bufferOutput.

    • Fixed spelling errors in README and code comments.

    Open source →
  47. 0.6.1+1 25 Mar 2015
    Release notes
    • Don't throw a bogus exception for null responses.
    Open source →
  48. 0.6.1+2 11 May 2015
    Release notes
    • logRequests outputs a better message if a request has a query string.
    Open source →
  49. 0.6.1+3 06 Jul 2015
    Release notes
    • Updated minimum SDK to 1.9.0.

    • Allow an empty url parameter to be passed in to new Request(). This fits the stated semantics of the class, and should not have been forbidden.

    Open source →
  50. 0.6.0 04 Mar 2015
    Release notes

    Breaking change: The semantics of Request.scriptName and Request.url have been overhauled, and the former has been renamed to Request.handlerPath. handlerPath is now the root-relative URL path to the current handler, while url's path is the relative path from the current handler to the requested. The new semantics are easier to describe and to understand.

    Practically speaking, the main difference is that the / at the beginning of url's path has been moved to the end of handlerPath. This makes url's path easier to parse using the path package.

    Request.change's handling of handlerPath and url has also changed. Instead of taking both parameters separately and requiring that the user manually maintain all the associated guarantees, it now takes a single path parameter. This parameter is the relative path from the current handlerPath to the next one, and sets both handlerPath and url on the new Request accordingly.

    Open source →
  51. 0.5.7 21 Jan 2015
    Release notes
    • Updated Request to support the body model from Response.
    Open source →
  52. 0.5.6 24 Nov 2014
    Release notes
    • Fixed createMiddleware to only catch errors if errorHandler is provided.

    • Updated handleRequest in shelf_io to more gracefully handle errors when parsing HttpRequest.

    Open source →
  53. 0.5.5 23 Sep 2014
    Release notes
    • Added default body text for Response.forbidden and Response.notFound if null is provided.

    • Clarified documentation on a number of Response constructors.

    • Updated README links to point to latest docs.

    Open source →
  54. 0.5.5+1 14 Oct 2014
    Release notes
    • Updated Request.change to include the original onHijack callback if one exists.
    Open source →
  55. 0.5.4 28 May 2014
    Release notes
    • The shelf_io adapter now sends the Date HTTP header by default.

    • Fixed logic for setting Server header in shelf_io.

    Open source →
  56. 0.5.4+1 02 Jun 2014
    Release notes
    • Widen the version constraint for stack_trace.
    Open source →
  57. 0.5.4+2 07 Jul 2014
    Release notes
    • Updated headers map to use a more efficient case-insensitive backing store.
    Open source →
  58. 0.5.4+3 26 Aug 2014
    Release notes
    • Widen the version constraint on the collection package.
    Open source →
  59. 0.5.3 24 May 2014
    Release notes
    • Add new named parameters to Request.change: scriptName and url.
    Open source →
  60. 0.5.2 19 May 2014
    Release notes
    • Add a Cascade helper that runs handlers in sequence until one returns a response that's neither a 404 nor a 405.

    • Add a Request.change method that copies a request with new header values.

    • Add a Request.hijack method that allows handlers to gain access to the underlying HTTP socket.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive