From 0d769a3563f4a52a465549ccd99ab0d3615b2cde Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Wed, 18 Jul 2018 17:01:39 +0100 Subject: [PATCH] Version 0.4.0. --- changelog.markdown | 15 +++++++++++++++ jester.nim | 2 +- jester.nimble | 4 ++-- readme.markdown | 3 ++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index 1b132ae..f219a5a 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -1,5 +1,20 @@ # Jester changelog +## 0.4.0 - 18/07/2018 + +This is a major new release focusing on optimizations. In one specific benchmark +involving pipelined HTTP requests, the speed up was 650% in comparison to +Jester v0.3.0. For another benchmark using the `wrk` tool, with no pipelining, +the speed up was 178%. + +A list of changes follows: + +- **Breaking change:** The response headers are now stored in a more efficient + data structure called ``RawHeaders``. This new data structure is also stored + in an ``Option`` type, this makes some responses significantly more efficient. +- ``sendFile`` has been implemented, so it's now possible to easily respond + to a request with a file. + ## 0.3.0 - 06/07/2018 This is a major new release containing many changes and improvements. diff --git a/jester.nim b/jester.nim index e7f5bbf..013f0d1 100644 --- a/jester.nim +++ b/jester.nim @@ -72,7 +72,7 @@ type of RouteCode: data: ResponseData -const jesterVer = "0.3.1" +const jesterVer = "0.4.0" proc toStr(headers: Option[RawHeaders]): string = return $newHttpHeaders(headers.get(@({:}))) diff --git a/jester.nimble b/jester.nimble index b4b0bc6..08e990b 100644 --- a/jester.nimble +++ b/jester.nimble @@ -1,6 +1,6 @@ # Package -version = "0.3.1" +version = "0.4.0" # Be sure to update jester.jesterVer too! author = "Dominik Picheta" description = "A sinatra-like web framework for Nim." license = "MIT" @@ -13,7 +13,7 @@ skipDirs = @["tests"] requires "nim >= 0.18.1" when not defined(windows): - requires "httpbeast >= 0.1.1" + requires "httpbeast >= 0.2.0" # For tests requires "asynctools" diff --git a/readme.markdown b/readme.markdown index 2cd77d9..95ef2fe 100644 --- a/readme.markdown +++ b/readme.markdown @@ -140,7 +140,8 @@ get "/": setCookie("test", @"value", daysForward(5)) ``` -They can then be accessed from the ``request.cookies`` PStringTable. +They can then be accessed using the ``request.cookies`` procedure which returns +a ``Table[string, string]``. ## Request object