- Removed
StreamServer.logger. The server now uses an internalLoggerinstance instead.- To ensure the startup message is shown, initialize
LoggeratLevel.INFO.
- To ensure the startup message is shown, initialize
- Added a new
onStatusCodeargument to [proxyRequest] to enable monitoring of returned status codes.
- #91: [HttpConnect.ifModifiedSince] added to avoid exception
copyToSinkallows caller to abort the copying by adding thecloseargument.
copyToSinkadded for copying from [Stream] to [EventSink].
- The
getStartupMessageparameter added toStreamServer.startfor customizing the startup message.
- Fix: HTTP Directory Traversal Vulnerability
DefaultRouter's URI mapping supportsRegExpandString.- Stream's named group in the syntax of
(name:...)is no longer supported.- Use regular expression's named capturing group instead.
- Example:
'/foo/(?<seg>.*)': '/moo/(seg)]', - If you'd like to retrieve the named capturing group in Dart, use
DefaultRouter.getNamedGroup(name)(instead ofconnect.dataset[name]).
- Example:
- Use regular expression's named capturing group instead.
- Fix: the included RSP page can't access the correct [HttpConnect.language]
SoloTagadded for parsing any syntax for tags.
SimpleTagsupportsstringFirst.
- #90: support the prefix with the preferred language by specifying the
languagesargument when instantiatingStreamServer. Http414,Http415... added
proxyRequestallows caller to specify how to log ignorable errors.
- rspc won't generate: import 'dart:io';
proxyRequestignores headers with invalid characters.
StreamServer.onErrorcan be reset withnull.Http501added.
- Add the setter of
Server.pathPreprocessorback
- Merge 2.6.1
- Migrate to null safety
HttpConnect.headerValue'sdefaultValueremoved. Use??instead.
PayloadExceptionwill be caught and return HTTP Status 413 instead.Http410,Http413andHttp418added
HttpConnect.autoCloseadded to control whether to close the response at the end.
- Throws 404 if path contains invalid UTF characters
- Fix #87: File name containing a space
Server.onError()expectsStackTracerather thandynamic.
- #86: the error mapping can map only error codes (integers). It implies
- You can't specify the class name in the error mapping.
- The type of the
errorMappingarugment becomesMap<int, dynamic> - You'd like to handle a particular exception specially. You shall throw a special integer, say, -900, and then map it to your handler.
Or, you can override
DefaultRouter.getErrorHandlerto detect the error.
- Fix #85 The method
_ReadOnlyHeaders.addhas fewer named arguments than those of overridden method 'HttpHeadersWrapper.add [Dart 2.8]
- Limit Dart SDK version for Dart 2.8 version breaking change.
- Add links to github repo in pubspec.yaml.
ResourceLoader.loadsupportsuseCacheto control whether to use the cache.
Rsp.isHeaderValueValidis added.proxyRequestwon't copy request's headers to response's if not valid.
HttpStatusException,Http500,Http403and others are changed.
ScriptTag([:script]) no longer supported. Use<script>instead.
HttpConnect.headerValueintroduced.
rpsc.dartenhanced to support folders. Also, it can compile only if source files are modified (the-noption).
- Dart 2 supported
proxyRequest()introduced to proxy requests to another server
- Allow user to map a URI to another website in router.
- If
StreamServer.onErroris registered, the default logging will be disabled.
- The line number won't be generated in the output Dart file. To turn it on, specify
-noption.
Http503introduced.
Rsp.nnfis deprecated. Recompile all RSP files to remove the use.
StreamServer.shallCountintroducedStreamServer's futureOnly argument is removed.
StreamServer's futureOnly argument is deprecated.AssetLoader.cachecan be set to null (to disable caching).
DefaultRouter.shallCacheintroduced
Server.pathPreprocessorintroduced
[=data, encode: 'json']is supportedLoggingConfigureris removedStreamServer's constructor is changed: disableLog replacesloggingConfigurer.
StreamServer.stopandHttpChannel.closereturns a Future instance.
- Issue 80: Allow
[:include]inside[:for],[:if]and any tag - Specifying the etag attribute in the page tag won't imply
lastModified="start"
- Issue 79:
[:script]supports the async flag
- Issue 78:
StreamServer.chunkedTransferEncodingdeprecated. - The server will be started with
runZoned()by default.
- Add an option to start the server with runZoned() (see also https://code.google.com/p/dart/issues/detail?id=17468)
- Issue 74: StreamServer.onError shall catch all uncaught errors
- The
maxlengthargument ofRspUtil.nnx()is renamed tomaxLength. Server.onIdle()andServer.connectionCountare added.
December 16, 2013
- Issue 67: RSP's header directives shall be generated before handling ETAG and Last-Modified
November 20, 2013
- Issue 61: HttpServer.bind(address, port, backlog: backlog) return null
- The global variables, contentTypes and statusMessages, are moved to Rikulo Commons.
- Issue 59: error mapping not work
- Issue 53: FileLoader supports multipart/byteranges
- Issue 54: Support If-Match, If-None-Match, If-Modified-Since and If-Unmodified-Since
- Issue 55: Support If-Range
- Issue 56: Generalize FileLoader to support the loading from different resources, such as database
- Issue 57: RSP supports etag (and HttpStatus.NOT_MODIFIED)
- Issue 58: HttpConnect supports method to retrieve the locale(s) of the request
- Issue 51: FileLoader supports partial content, aka., range
- Issue 52: FileLoader supports ETag and caching
- Issue 49: RSP: Able to generate additional imported packages without specifying them in each RSP file
- Issue 48: RSP: A tag to simplify the implementation of custom tags s.t. dev needs to implement a closure only
- Channel, HttpChannel and SocketChannel are merged into HttpChannel
- Issue 47: RSP shall escape $ to prevent Dart from interpreting it.
- Issue 44: The page tag supports the part attribute to include other dart files, and the dart attribute to embed code before the function
- Issue 42: Allow a Stream server to listen multiple addresses/ports and web sockets
- Issue 43: Allow to map WebSocket directly without invoking WebSocketTransformer explicitly
- Issue 41: Able to encode the build number into JS and/or CSS s.t. the browse will use the latest JS/CSS automatically
- API changed because of the deprecation of Path
- StreamServer.chunkedTransferEncoding supported for compressing the output with GZIP
- Issue 38: Unable to use the nested groups in route segments
- Issue 36: Change the spec of
[:json]to generate a JSON object that can be parse as Dart object directly - Issue 35: A tag for generating the dart script for development, while generating only JS in production
- HttpConnect.buffer is renamed to HttpConnect.stringBuffer, while HttpConnect.buffer reserved for bytes
- Issue 32: HttpConnect provides API to retrieve the information of the browser
- Issue 31: RSP supports last-modified as the time it has been compiled
- Issue 33: The expression tag (
[= expr]) supports the encoding option - Issue 34: Make the webapp directory optional
- Issue 28: Support the JSON tag for simplifying the rendering of a Dart object
- Issue 29: The homDir argument shall interpret the relative path against the root directory of the application
- HttpConnect.error has been removed. All errors shall be wired back Future.
- StreamServer.host can be String or InternetAddress, and the default is ANY_IP_V4.
- Issue 27: Able to configure Stream server to enforce the return of Future in every handler.
- Issue 16: Make include, forward and handler to return Future if there is any async task
- Issue 17: include and forward shall handle the query string
- Issue 24: llow RSP compiler receive a FilenameMapper function to map output files
- Issue 26: Support HttoConnect.redirect(uri) to redirect to another URI
Upgrade Notes
- The request handler must return
Futureif it spawned an asynchronous task. - The request handler can't return a forwarding URI. Rather, it shall invoke and return
connect.forward(uri)instead. - The request handler needs not to close the connection. It is done automatically.
- RSP will import
dart:asyncby default. - The request filter must return
Future. - The
close,onCloseandonErrormethods ofHttpConnectare removed. Chaining request handlers is straightforward: it is the same as chainingFutureobjects.
- Issue 11: Allow URI and filter mapping to be added dynamically
Upgrade Note
- The syntax of a tag has been changed from
[tag]to[:tag]. The old syntax still works but will be removed in the near future.
- Issue 7: Allow URI mapping to be pluggable
- Issue 8: URI mapping supports RESTful like mapping
- Issue 9: URI mapping allows to forward to another URI
- [page] introduces the partOf and import attributes
- [dart] is always generated inside the render function
- Issue 2: RSP files can be put in the client folder (i.e., not under the webapp folder)
- Issue 3: [page] partOf accepts a dart file and maintains it automatically
- Issue 4: Allow to mix expression (
[=...]) with literal in tag attributes
- The composite view (aka., templating) is supported.
- The syntax of the include and forward tags are changed.
- The var tag is introduced.
- URL mapping supports grouping, such as /user/(name:[^/]*)
- StreamServer.run() is deprecated. Use start(), startSecure() or startOn() instead.
- Support the new Dart I/O.
- The filter mapping is supported.
- HttpConnect.then is removed. Use Future.catchError() instead.
- The error mapping takes the syntax of Map<code or exception, URI or function>.
- The comment tag is renamed to a pair of
[!--and--]