NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #60 most downloaded on pub.dev
A model for web server middleware that encourages composition and easy reuse.
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 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
78 releases · first in 2014
Headers: added the fromEntries constructor.
Headers: added the fromEntries constructor.http_parser: ^4.1.0^3.4.0.Added package topics to the pubspec file.
Add Response.unauthorized() constructor
One column per quarter.
poweredByHeader argument to serve, serveRequests, and
handleRequest.Started setting X-Powered-By response header to Dart with package:shelf.
shelf_io.dart
X-Powered-By response header
to Dart with package:shelf.Server header (with value dart:io with Shelf).Update the pubspec repository field.
repository field.Add Response.badRequest() constructor
ServerHandler.Added MiddlewareExtensions which provides addMiddleware and addHandler to Middleware instances. Provides easier access to the composition capabilities
MiddlewareExtensions which provides addMiddleware and addHandler
to Middleware instances. Provides easier access to the composition
capabilities offered by Pipeline.Support analyzer: '^10.0.0'
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
analyzer: ^8.1.1build: ^4.0.0build_config: ^1.2.0source_gen: ^4.0.1sdk: ^3.9.0content-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.Require analyzer: '>=7.4.0 <9.0.0'
analyzer: '>=7.4.0 <9.0.0'build: ^3.0.0build_config: ^1.1.0source_gen: ^3.0.0sdk: ^3.7.0Support the latest package:analyzer and package:source_gen
package:analyzer and package:source_gensdk: ^3.3.0List<int> or
Stream<List<int>> in a CastList/CastStream to improve
performance.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 ap
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.* Stable null safety release.
Update to support Dart null-safety.
change function on Request and Response to clear existing
values in context if the provided context value has null values.Allow a handlerPath to lead up to a double // in a URI.
handlerPath to lead up to a double // in a URI.Handle malformed URLs (400 instead of 500).
Fix internal error in Request when .change() matches the full path.
Request when .change() matches the full path.Supports multiple header values in Request and Response:
Request and Response:
headersAll field contains all the header valuesheaders 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.Return the correct HTTP status code for badly formatted requests.
Allow passing shared parameter to underlying HttpServer.bind calls via shelf_io.serve.
shared parameter to underlying HttpServer.bind calls via
shelf_io.serve.encoding in Response constructors forbidden, notFound,
and internalServerError.README.md to point to latest docs.Allow stream_channel version 2.x
stream_channel version 2.xFix some Dart 2 runtime errors.
Updated SDK version to 2.0.0-dev.55.0.
Fix constant evaluation analyzer error in shelf_unmodifiable_map.dart.
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.
Set max SDK version to <3.0.0, and adjust other dependencies.
<3.0.0, and adjust other dependencies.Update createMiddleware arguments to use FutureOr.
Update createMiddleware arguments to use FutureOr.
Updated minimum Dart SDK to 1.24.0, which added FutureOr.
Improved formatting of the logRequests default logger.
The shelf_io server now adds a shelf.io.connection_info field to Request.context, which provides access to the underlying HttpConnectionInfo object.
shelf_io server now adds a shelf.io.connection_info field to
Request.context, which provides access to the underlying
HttpConnectionInfo object.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
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.
Add a securityContext parameter to self_io.serve().
securityContext parameter to self_io.serve().Add Request.isEmpty and Response.isEmpty getters which indicate whether a message has an empty body.
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.
Never auto-generate a Content-Length header.
Content-Length header.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-Encodi
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.
Allow List s to be passed as request or response bodies.
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.
The old callback signature is still supported, but should be considered deprecated.
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.
Fix all strong-mode warnings and errors.
* Support http_parser 3.0.0.
http_parser 3.0.0.Improve the documentation of logRequests().
logRequests().Add a Server interface representing an adapter that knows its own URL.
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.
When the shelf_io adapter detects an error, print the request context as well as the error itself.
shelf_io adapter detects an error, print the request context as
well as the error itself.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 lowerca
Content-Type header didn't interact properly with the
encoding parameter for new Request() and new Response() if it wasn't
lowercase.* Support http_parser 2.0.0.
http_parser 2.0.0.Messages returned by Request.change() and Response.change() are marked read whenever the original message is read, and vice-versa. This means that it'
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.Cleaned up handling of certain Map instances and related dependencies.
Map instances and related dependencies.Added a body named argument to change method on Request and Response.
body named argument to change method on Request and Response.* Support http_parser 1.0.0.
http_parser 1.0.0.shelf_io now takes a "shelf.io.buffer_output" Response.context parameter that controls HttpResponse.bufferOutput.
shelf_io now takes a "shelf.io.buffer_output" Response.context parameter
that controls HttpResponse.bufferOutput.
Fixed spelling errors in README and code comments.
Don't throw a bogus exception for null responses.
null responses.logRequests outputs a better message if a request has a query string.
logRequests outputs a better message if a request has a query string.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.
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.
Breaking change: The semantics of Request.scriptName and [Request.url][url] have been overhauled, and the former has been renamed to [Request.handlerP…
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.
Updated Request to support the body model from Response.
Request to support the body model from Response.Fixed createMiddleware to only catch errors if errorHandler is provided.
Fixed createMiddleware to only catch errors if errorHandler is provided.
Updated handleRequest in shelf_io to more gracefully handle errors when
parsing HttpRequest.
Added default body text for Response.forbidden and Response.notFound if null is provided.
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.
Updated Request.change to include the original onHijack callback if one exists.
Request.change to include the original onHijack callback if one
exists.The shelf_io adapter now sends the Date HTTP header by default.
The shelf_io adapter now sends the Date HTTP header by default.
Fixed logic for setting Server header in shelf_io.
Widen the version constraint for stack_trace.
stack_trace.Updated headers map to use a more efficient case-insensitive backing store.
Widen the version constraint on the collection package.
collection package.Add new named parameters to Request.change: scriptName and url.
Request.change: scriptName and url.Add a Cascade helper that runs handlers in sequence until one returns a response that's neither a 404 nor a 405.
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.
Your coding agent can read these notes before it upgrades. Set up the MCP server →