Skip to content

Releases: scottoffen/grapevine-legacy

4.0.0.125

17 Sep 01:17
Compare
Choose a tag to compare

Important Bug Fixes!

#121 Routes Fail To Automatically Registered When Server Starts With Empty Routing Table

If you were manually registering your routes, this didn't impact you. If you were counting on having the route register automatically when you started your server, this was failing. When I put in the new RouteScanner I hooked it up in the RestServer incorrectly - so, while it was scanning your assembly and creating routes, they weren't being added to the Routers routing table. Routes are now being added to the routing table correctly under these conditions.

#120 RestServer Populates Empty Router Before Calling OnBeforeStart

Invoking the OnBeforeStart generic delegate should happen before anything else in the Start() method, but I noticed I had the router registering routes first, then the delegate got invoked. RestServer will now execute those in the correct order.

#119 RouteScanner scans vhost32

This is only an issue in a development environment, but I found it annoying. A quick fix now makes sure that this assembly isn't scanned during the scanning process.

#118 RouteScanner Doesn't Check Included Namespaces

In general this turned out to be something of a non-issue, but some code was changed as a result. In the future, including namespaces very well might be something that gets pulled out entirely.

4.0.0.115

12 Sep 16:29
Compare
Choose a tag to compare

Resolved a number of miscellaneous bugs in addition to the following issues:

#110 Improved Error Handling in Router

Updated such that if the Begin delegate gets invoked successfully, the After delegate will also be invoked, even if exceptions are thrown in the request routing process.

#113 Replaced ReadOnlyDictionary

The read-only feature wasn't really providing any value. Each route gets a new instance of the dictionary anyway, so if you make changes to it in one route, the next route won't receive those changes.

#114 Improved Route Scanning

Automatic routing has been separated out into its own concern - RouteScanner - and is now accessed via a property on the Router class - Router.Scanner. While it can be invoked manually, its Scan() method will be called automatically if the server is started with an empty routing table.

Scan() can only scan assemblies in the current AppDomain.

#117 Error Parsing ContentType From String

There was an issue in the client where it was unable to parse a value from the ContentType enum for the value in the string in the request. A new extension method was added to both resolve this and make the functionality consistent between the client and the server.

4.0.0.82

24 Aug 22:20
Compare
Choose a tag to compare

Improved exception handling on starting and stopping the server
Implemented fix for handling timeouts on rest client (re-throwing timeout exception)
Closed reader before closing stream

4.0.0.79

24 Aug 20:23
Compare
Choose a tag to compare

Hotfix for issue #107

4.0.0.74

22 Aug 01:36
Compare
Choose a tag to compare

4.0.0.53

01 Aug 15:07
Compare
Choose a tag to compare

#82 Removed dependency on System.Web
After all the changes from 3.x to 4.0, the only reference to System.Web was to do some simple URI encoding, and there are WAY small implementations to use. So, this dependency has been refactored out.

#83 Changed RestClient and RestResource to use UriBuilder
The original implementation in the client was doing a lot of work that UriBuilder inherently does, so it made sense to update my implementation to utilize it. This came with some additional refactoring in the client, but nothing too drastic.

#84 Added mechanism to define specific code to execute prior to and after all routes
Completely optional, this provides a route-registration independent way to ensure something gets ran prior to every route (such as authentication and/or database allocation) and after the routing table execution completes (such as closing files and connections) - regardless of what type of response was sent to the requesting client.

Router.Before and Router.After both take generic delegates with a signature Func<IHttpContext, IHttpContext>

#85 Added content types for form data
When switching everything over to use the Grapevine specific ContentType class, I discovered that I lacked MIME types for form data. The oversight has been remedied with the addition of ContentType.FormUrlEncoded and ContentType.MultipartFormData.

4.0.0-alpha.4

24 Jul 17:09
Compare
Choose a tag to compare
4.0.0-alpha.4 Pre-release
Pre-release

#70 Refactored dynamic properties

  • Rename DynamicAspect to DynamicProperties
  • Rename the field from Dynamic to Properties
  • Remove dynamic property from HttpRequest and HttpResponse
  • Add (or keep) dynamic property on RestServer and HttpContext
  • Lazy load ExpandoObject

#71 Added a flag to continue routes after response sent
There may be a case where you want all routes to execute, even after a response has been sent to the client. Added a property to the Router class to toggle this behavior on and off, and updated .Route() to honor the flag.

Note that when this is turned on, it will become the responsibility of the individual routes to ensure that a response has not already been sent before attempting to send one.

#73 Removed .IsValidRegex() private method from ParamParser
It really wasn't doing anything of value.

#74 Changed ContentRoot to PublicFolder
The latter more accurately describes it's purpose.

#75 Added an In Memory Implementation of IGrapevineLogger
For easier unit and integration testing

#76 Returning a file should filter on GET and HEAD
Was previously only filtering on GET

#77 Added Description Property to Route
So you can provide an easy to read description of the route for debugging purposes

#78 Altered IHttpContext.WasRespondedTo() to be a property instead of a method

#80 Refactoring for Extension
Refactoring to make Server objects easier to extend. This primarily involved changing the access of some properties to protected and adding additional properties to the Advanced sections.

4.0.0-alpha.3

09 Jul 23:55
Compare
Choose a tag to compare
4.0.0-alpha.3 Pre-release
Pre-release

Fix for issue #69, Failing to serve static content.

4.0.0-alpha.2

07 Jul 23:59
Compare
Choose a tag to compare
4.0.0-alpha.2 Pre-release
Pre-release

Complete client refactoring: exposing more of underlying HttpWebRequest and HttpWebResponse methods, moving functionality to more appropriate classes, changed QueryString and PathParams to use composition.

4.0.0-alpha.1

05 Jul 18:08
Compare
Choose a tag to compare
4.0.0-alpha.1 Pre-release
Pre-release

Contains bug fixes and enhancements for multiple issues.

#27 InternalServerError override not invoked in implementation of RESTResource
This is now obsolete, given that there is no longer a method to override.

#40 Implement thread-safe RestServer.Stop() for use in routes
Added the method ThreadSafeStop() to the RestServer class, added IRestServer to IHttpContext to ensure the method would be available to all routes.

#42 RestServer Authentication
In addition to the new routing table implementation, see #58

#43 Creating a cluster with multiple RESTServers does not process HTTP requests
Unable to duplicate. See the Grapevine.Integration project for example code.

#44 Passing application-specific info to response handlers
Added an ExpandoObject to the HttpContext, HttpRequest and HttpResponse classes. Pass data around to your hearts content! Additionally, the route creation methods can aid in providing additional context to the response handlers.

#49 Add logging interface to replace now defunct EventLogger
See IGrapevineLogger; create your own implementation and pass it to the RestServer instance.

#53 Make calling server accessible to routes
Added IRestServer property to IHttpContext

#56 Add mechanism to find an open port on a given host
See PortFinder class; has both synch and asynch static and instance methods.

#57 Add Dynamic property to RestServer class
Added an ExpandoObject to the RestServer

#58 Provide limited access to the underlying HttpListener instance
Added an Advanced property to the RestServer class that provides access to (almost) all the methods and properties of the underlying HttpListener. Use with caution.

#59 Enable and disable individual routes
Added Enable() and Disable() methods to IRoute