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 2024Releases
latest 60 of 78-
1.4.221 Jun 2024Release notes
Open source →Headers: added thefromEntriesconstructor.- Require
http_parser: ^4.1.0 - Require Dart
^3.4.0.
-
1.4.103 May 2023 -
1.4.020 Sep 2022Release notes
Open source →- Add Response.unauthorized() constructor
- Add
poweredByHeaderargument toserve,serveRequests, andhandleRequest. - Require Dart >= 2.17
-
1.3.228 Jul 2022Release notes
Open source →shelf_io.dart- Started setting
X-Powered-Byresponse header toDart with package:shelf. - Stopped setting
Serverheader (with valuedart:io with Shelf).
- Started setting
-
1.3.116 Jun 2022 -
1.3.028 Mar 2022Release notes
Open source →- Add Response.badRequest() constructor
- Deprecate
ServerHandler. - Require Dart >= 2.16
-
1.2.008 Jul 2021Release notes
Open source →- Added
MiddlewareExtensionswhich providesaddMiddlewareandaddHandlertoMiddlewareinstances. Provides easier access to the composition capabilities offered byPipeline.
- Added
-
1.1.413 May 2021 -
1.1.313 May 2021Release notes
Open source →- 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
Release notes
Open source →- Automatically remove
content-lengthheader from aResponse.notModified. Restores some of the safety around malformed requests that was removed in1.1.2where we started allowingcontent-lengthfor some responses without bodies. - Documentation cleanup.
- Require
-
1.1.207 May 2021Release notes
Open source →- 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
Release notes
Open source →- Allow an explicit non-zero content-length header if the body is empty. (Needed to correctly support HEAD requests).
- Require
-
1.1.123 Apr 2021Release notes
Open source →- Support the latest
package:analyzerandpackage:source_gen - Require
sdk: ^3.3.0
Release notes
Open source →- Avoid wrapping response bodies that already contained
List<int>orStream<List<int>>in aCastList/CastStreamto improve performance.
- Support the latest
-
1.1.017 Mar 2021Release notes
Open source →- Change
Request.hijackreturn type fromvoidtoNever. This may cause analysis hints in packages using this method, but is not actually breaking for apps.
- Change
-
1.0.005 Feb 2021 -
1.0.0-nullsafety.029 Jan 2021 pre-releaseRelease notes
Open source →- Update to support Dart null-safety.
- Updated the
changefunction onRequestandResponseto clear existing values incontextif the providedcontextvalue hasnullvalues.
-
0.7.914 Aug 2020 -
0.7.812 Aug 2020 -
0.7.719 Jun 2020 -
0.7.618 Jun 2020Release notes
Open source →- Supports multiple header values in
RequestandResponse:headersAllfield contains all the header valuesheadersfield contains the same values as previously (appending values with,)headersparameter in the constructor and in the.change()method accepts bothStringandList<String>values.
- Supports multiple header values in
-
0.7.501 Apr 2019 -
0.7.417 Dec 2018Release notes
Open source →- Allow passing
sharedparameter to underlyingHttpServer.bindcalls viashelf_io.serve. - Correctly pass
encodinginResponseconstructorsforbidden,notFound, andinternalServerError. - Update
README.mdto point to latest docs.
- Allow passing
-
0.7.4+127 Mar 2019 -
0.7.302 May 2018 -
0.7.3+122 May 2018 -
0.7.3+210 Jul 2018Release notes
Open source →-
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.
-
-
0.7.3+316 Jul 2018 -
0.7.204 Jan 2018Release notes
Open source →-
Update
createMiddlewarearguments to useFutureOr.- 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 addedFutureOr. -
Improved formatting of the
logRequestsdefault logger.
-
-
0.7.126 Oct 2017Release notes
Open source →- The
shelf_ioserver now adds ashelf.io.connection_infofield toRequest.context, which provides access to the underlyingHttpConnectionInfoobject.
- The
-
0.7.029 Aug 2017Release notes
Open source →-
Give a return type to the
Handlertypedef. This may cause static warnings where there previously were none, but all handlers should have already been returning aResponseorFuture<Response>. -
Remove
HijackCallbackandOnHijackCallbacktypedefs. -
Breaking: Change type of
onHijackin theRequestconstructor to take an argument ofStreamChannel.
-
-
0.6.823 Jun 2017 -
0.6.726 Oct 2016Release notes
Open source →-
Add
Request.isEmptyandResponse.isEmptygetters which indicate whether a message has an empty body. -
Don't automatically generate
Content-Lengthheaders on messages where they may not be allowed. -
User-specified
Content-Lengthheaders now always take precedence over automatically-generated headers.
-
-
0.6.7+126 Oct 2016 -
0.6.7+206 Dec 2016Release notes
Open source →-
Go back to auto-generating a
Content-Lengthheader when the length is known ahead-of-time and the user hasn't explicitly specified aTransfer-Encoding: chunked. -
Clarify adapter requirements around transfer codings.
-
Make
shelf_ioconsistent with the clarified adapter requirements. In particular, it removes theTransfer-Encodingheader from chunked requests, and it doesn't apply additional chunking to responses that already declareTransfer-Encoding: chunked.
-
-
0.6.624 Oct 2016Release notes
Open source →-
Allow
List<int>s to be passed as request or response bodies. -
Requests and responses now automatically set
Content-Lengthheaders when the body length is known ahead of time. -
Work around sdk#27660 by manually setting
HttpResponse.chunkedTransferEncodingtofalsefor requests known to have no content.
-
-
0.6.528 Jan 2016Release notes
Open source →-
Request.hijack()now takes a callback that accepts a singleStreamChannelargument rather than separateStreamandStreamSinkarguments. The old callback signature is still supported, but should be considered deprecated. -
The
HijackCallbackandOnHijackCallbacktypedefs are deprecated.
-
-
0.6.5+104 May 2016 -
0.6.5+205 May 2016 -
0.6.5+325 Aug 2016 -
0.6.426 Oct 2015Release notes
Open source →-
Add a
Serverinterface representing an adapter that knows its own URL. -
Add a
ServerHandlerclass that exposes aServerbacked by aHandler. -
Add an
IOServerclass that implementsServerin terms ofdart:io'sHttpServer.
-
-
0.6.4+128 Oct 2015Release notes
Open source →- When the
shelf_ioadapter detects an error, print the request context as well as the error itself.
- When the
-
0.6.4+218 Nov 2015Release notes
Open source →- Fix a bug where the
Content-Typeheader didn't interact properly with theencodingparameter fornew Request()andnew Response()if it wasn't lowercase.
- Fix a bug where the
-
0.6.4+314 Dec 2015 -
0.6.301 Sep 2015Release notes
Open source →- Messages returned by
Request.change()andResponse.change()are marked read whenever the original message is read, and vice-versa. This means that it's possible to read a message on whichchange()has been called and to callchange()on a message more than once, as long asread()is called on only one of those messages.
- Messages returned by
-
0.6.3+121 Oct 2015 -
0.6.206 Jul 2015 -
0.6.2+126 Aug 2015 -
0.6.125 Mar 2015Release notes
Open source →-
shelf_ionow takes a"shelf.io.buffer_output"Response.contextparameter that controlsHttpResponse.bufferOutput. -
Fixed spelling errors in README and code comments.
-
-
0.6.1+125 Mar 2015 -
0.6.1+211 May 2015 -
0.6.1+306 Jul 2015Release notes
Open source →-
Updated minimum SDK to
1.9.0. -
Allow an empty
urlparameter to be passed in tonew Request(). This fits the stated semantics of the class, and should not have been forbidden.
-
-
0.6.004 Mar 2015Release notes
Open source →Breaking change: The semantics of
Request.scriptNameandRequest.urlhave been overhauled, and the former has been renamed toRequest.handlerPath.handlerPathis now the root-relative URL path to the current handler, whileurl'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 ofurl's path has been moved to the end ofhandlerPath. This makesurl's path easier to parse using thepathpackage.Request.change's handling ofhandlerPathandurlhas also changed. Instead of taking both parameters separately and requiring that the user manually maintain all the associated guarantees, it now takes a singlepathparameter. This parameter is the relative path from the currenthandlerPathto the next one, and sets bothhandlerPathandurlon the newRequestaccordingly. -
0.5.721 Jan 2015 -
0.5.624 Nov 2014Release notes
Open source →-
Fixed
createMiddlewareto only catch errors iferrorHandleris provided. -
Updated
handleRequestinshelf_ioto more gracefully handle errors when parsingHttpRequest.
-
-
0.5.523 Sep 2014Release notes
Open source →-
Added default body text for
Response.forbiddenandResponse.notFoundif null is provided. -
Clarified documentation on a number of
Responseconstructors. -
Updated
READMElinks to point to latest docs.
-
-
0.5.5+114 Oct 2014Release notes
Open source →- Updated
Request.changeto include the originalonHijackcallback if one exists.
- Updated
-
0.5.428 May 2014Release notes
Open source →-
The
shelf_ioadapter now sends theDateHTTP header by default. -
Fixed logic for setting Server header in
shelf_io.
-
-
0.5.4+102 Jun 2014 -
0.5.4+207 Jul 2014Release notes
Open source →- Updated headers map to use a more efficient case-insensitive backing store.
-
0.5.4+326 Aug 2014 -
0.5.324 May 2014 -
0.5.219 May 2014Release notes
Open source →-
Add a
Cascadehelper that runs handlers in sequence until one returns a response that's neither a 404 nor a 405. -
Add a
Request.changemethod that copies a request with new header values. -
Add a
Request.hijackmethod that allows handlers to gain access to the underlying HTTP socket.
-