belatuk_http_server 5.0.0
belatuk_http_server: ^5.0.0 copied to clipboard
A collection of useful utility classes for building HTTP server.
Change Log #
5.0.0 #
Breaking changes in 5.0.0 #
- Breaking: Requires Dart 3.13 or later.
- Breaking:
HttpBodyHandleralways decodes anapplication/jsonbody as UTF-8, as RFC 8259 requires, and ignores anycharsetparameter. A leading byte order mark is ignored. A body that is not valid UTF-8 fails. This applies toprocessResponsetoo, so a response from a server that sends JSON in another charset, such asapplication/json; charset=iso-8859-1, now fails with aFormatException. - Breaking:
HttpBodyHandlerrequires anapplication/x-www-form-urlencodedbody to be ASCII, with any other character percent-encoded as UTF-8, as the URL Standard does. The request's charset and the default encoding are ignored for such a body. A body with raw non-ASCII bytes, or with a percent-escape that is not valid UTF-8, such as%E9for a Latin-1é, is rejected with 400 Bad Request.
Fixes in 5.0.0 #
- VirtualDirectory: A redirect that adds a directory's trailing slash always stays on the same host. A request such as
//other.host/dircould previously redirect the client toother.host. - VirtualDirectory: A request whose path has percent-escapes that are not valid UTF-8, such as
/%FF, gets a 400 Bad Request instead of an unhandled error and no response. If a customerrorPageHandlerthrows, or its future completes with an error, the response is still closed.errorPageHandlernow accepts aFutureOr<void> Function(HttpRequest), so anasynchandler can be typed as such; existing handlers are unaffected. - VirtualDirectory: A redirect to add a directory's trailing slash keeps the query string in place, instead of appending the slash to it.
- VirtualDirectory:
If-Modified-Sincecompares modification times to the second, as HTTP dates do, so unchanged files and listings get a 304 Not Modified. - VirtualDirectory: A directory listing's last-modified time is the newest of the directory and its entries, so editing a file in it is no longer served from cache.
- VirtualDirectory: Listing a directory no longer blocks the server while each entry is checked. An entry that is removed or cannot be read is left out of the listing, and a listing that fails is a 500 Internal Server Error instead of an empty page. A client that disconnects no longer causes an uncaught error: the future returned by
serveRequestcompletes normally instead of with the connection error. - VirtualDirectory: A
HEADrequest for a directory listing gets the headers without the listing. - VirtualDirectory: A
Rangevalue too large for an integer is handled like any other out-of-range value, instead of making an existing file a 404 Not Found. - VirtualDirectory: An open-ended
Rangethat starts at or past the end of the file, such asbytes=10-for a 10-byte file, gets a 416 Range Not Satisfiable instead of the whole file. So does a suffix range of no bytes,bytes=-0. A 416 response has aContent-Range: bytes */<length>header. TheRangeheader is ignored for an empty file, which is served with 200 OK. - HttpBodyHandler: A
multipart/form-databody with noboundary, or a part with noname, fails with anHttpException, instead of aTypeErrorthat escaped as an uncaught error.
4.6.0 #
- Require Dart >= 3.8
- Updated
lintsto 6.0.0 - Updated dependencies to the latest release
4.5.1 #
- Fixed linter warnings
4.5.0 #
- Require Dart >= 3.5
- Updated
lintsto 5.0.0 - Updated
mimeto 2.0.0
4.4.0 #
- Updated
lintsto 4.0.0
4.3.0 #
- Require Dart >= 3.3
4.2.0 #
- Upgraded
lintsto 3.0.0
4.1.2 #
- Fixed
_VirtualDirectoryFileStreamclass due to change in Dart 3.0.3
4.1.1 #
- Updated README
4.1.0 #
- Upgraded
test_apito 0.6.0
4.0.0 #
- Require Dart >= 3.0
4.0.0-beta.1 #
- Require Dart >= 3.0
- Fixed linter warnings
3.0.0 #
- Require Dart >= 2.17
- Fixed analyzer warnings
2.1.0 #
- Updated linter to
package:lints
2.0.2 #
- Transfered repository to
dart-backend
2.0.1 #
- Added example
2.0.0 #
- Migrated to
belatuk_http_server
1.0.0 #
- Migrate to null safety.
- Allow multipart form data with specified encodings that don't require decoding.
0.9.8+3 #
- Prepare for
HttpClientResponseSDK change (implementsStream<Uint8List>rather thanStream<List<int>>).
0.9.8+2 #
- Prepare for
File.openRead()SDK change in signature.
0.9.8+1 #
- Fix a Dart 2 type issue.
0.9.8 #
- Updates to support Dart 2 constants.
0.9.7 #
-
Updates to support Dart 2.0 core library changes (wave 2.2). See issue 31847 for details.
0.9.6 #
- Updated the secure networking code to the SDKs version 1.15 SecurityContext api
0.9.5+1 #
- Updated the layout of package contents.
0.9.5 #
- Removed the decoding of HTML entity values (in the form &#xxxxx;) for values when parsing multipart/form-post requests.
0.9.4 #
- Fixed bugs in the handling of the Range header