Tweak CHANGELOG.md (#677)

This commit is contained in:
Sijawusz Pur Rahnama 2024-04-10 18:31:48 +02:00 committed by GitHub
parent b074578c1a
commit a15ba83175
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,10 +2,11 @@
- Crystal 1.8.0 support :tada: - Crystal 1.8.0 support :tada:
- Fix multiple logger handlers when custom logger is used [#653](https://github.com/kemalcr/kemal/pull/653). Thanks @aravindavk :pray: - Fix multiple logger handlers when custom logger is used [#653](https://github.com/kemalcr/kemal/pull/653). Thanks @aravindavk :pray:
- Add Kemal::OverrideMethodHandler [#651](https://github.com/kemalcr/kemal/pull/651). Thanks @sdogruyol :pray: - Add `Kemal::OverrideMethodHandler` [#651](https://github.com/kemalcr/kemal/pull/651). Thanks @sdogruyol :pray:
- HeadRequestHandler: run GET handler and don't return the body [#655](https://github.com/kemalcr/kemal/pull/655). Thanks @compumike :pray: - `HeadRequestHandler`: run GET handler and don't return the body [#655](https://github.com/kemalcr/kemal/pull/655). Thanks @compumike :pray:
# 1.3.0 (09-10-2022) # 1.3.0 (09-10-2022)
- Crystal 1.6.0 support :tada: - Crystal 1.6.0 support :tada:
- Disable signal trap for usage Kemal with other tools [#642](https://github.com/kemalcr/kemal/pull/642). Thanks @le0pard :pray: - Disable signal trap for usage Kemal with other tools [#642](https://github.com/kemalcr/kemal/pull/642). Thanks @le0pard :pray:
- Bump exception_page shard to v0.3.0 [#645](https://github.com/kemalcr/kemal/pull/645). Thanks @Sija :pray: - Bump exception_page shard to v0.3.0 [#645](https://github.com/kemalcr/kemal/pull/645). Thanks @Sija :pray:
@ -15,11 +16,11 @@
- Crystal 1.5.0 support :tada: - Crystal 1.5.0 support :tada:
- Eliminated several seconds of delay when loading big mp4 file. Thanks @Athlon64 :pray: - Eliminated several seconds of delay when loading big mp4 file. Thanks @Athlon64 :pray:
- Fix content_for failing to capture the correct block input [#639](https://github.com/kemalcr/kemal/pull/639). Thanks @sdogruyol :pray: - Fix `content_for` failing to capture the correct block input [#639](https://github.com/kemalcr/kemal/pull/639). Thanks @sdogruyol :pray:
- Closes response by default in HTTP::Server::Context#redirect [#641](https://github.com/kemalcr/kemal/pull/641). Thanks @cyangle :pray: - Closes response by default in `HTTP::Server::Context#redirect` [#641](https://github.com/kemalcr/kemal/pull/641). Thanks @cyangle :pray:
- Enable option for index.html to be a directories default [#640](https://github.com/kemalcr/kemal/pull/640). Thanks @ukd1 :pray: - Enable option for `index.html` to be a directories default [#640](https://github.com/kemalcr/kemal/pull/640). Thanks @ukd1 :pray:
You can enable it via You can enable it via:
```crystal ```crystal
serve_static({"dir_index" => true}) serve_static({"dir_index" => true})
@ -31,7 +32,9 @@ You can enable it via
# 1.1.1 (22-02-2022) # 1.1.1 (22-02-2022)
- Ignore HTTP::Server::Response patching for crystal >= 1.3.0 [#628](https://github.com/kemalcr/kemal/pull/628). Thanks @SamantazFox :pray: - Remove Kilt [#618](https://github.com/kemalcr/kemal/pull/618). Thanks @sdogruyol :pray:
- Ignore `HTTP::Server::Response` patching for crystal >= 1.3.0 [#628](https://github.com/kemalcr/kemal/pull/628). Thanks @SamantazFox :pray:
# 1.1.0 (02-09-2021) # 1.1.0 (02-09-2021)
- You can now set your own application name for startup message [#606](https://github.com/kemalcr/kemal/pull/606). Thanks @aravindavk :pray: - You can now set your own application name for startup message [#606](https://github.com/kemalcr/kemal/pull/606). Thanks @aravindavk :pray:
@ -44,7 +47,7 @@ You can enable it via
- Crystal 1.0.0 support :tada: - Crystal 1.0.0 support :tada:
- Update Radix to use latest 0.4.0 [#596](https://github.com/kemalcr/kemal/pull/596). Thanks @luislavena :pray: - Update Radix to use latest 0.4.0 [#596](https://github.com/kemalcr/kemal/pull/596). Thanks @luislavena :pray:
- Use latest version of Ameba dependency (dev) [#597](https://github.com/kemalcr/kemal/pull/597). Thanks @luislavena :pray: - Use latest version of Ameba dependency (dev) [#597](https://github.com/kemalcr/kemal/pull/597). Thanks @luislavena :pray:
- Fix StaticFileHandler failing spec [#599](https://github.com/kemalcr/kemal/pull/599). Thanks @jinn999 :pray: - Fix `StaticFileHandler` failing spec [#599](https://github.com/kemalcr/kemal/pull/599). Thanks @jinn999 :pray:
# 0.27.0 (28-11-2020) # 0.27.0 (28-11-2020)
@ -70,21 +73,18 @@ You can enable it via
# 0.25.2 (08-02-2019) # 0.25.2 (08-02-2019)
- Add option to config to parse or not command line parameters [#483](https://github.com/kemalcr/kemal/pull/483). Thanks @diegogub :pray: - Add option to config to parse or not command line parameters [#483](https://github.com/kemalcr/kemal/pull/483). Thanks @diegogub :pray:
- Allow to set filename for `send_file` [#512](https://github.com/kemalcr/kemal/pull/512). Thanks @mamantoha :pray: - Allow to set filename for `send_file` [#512](https://github.com/kemalcr/kemal/pull/512). Thanks @mamantoha :pray:
```crystal
```ruby
send_file env, "./asset/image.jpeg", filename: "image.jpg" send_file env, "./asset/image.jpeg", filename: "image.jpg"
``` ```
- Set `status_code` before response [#513](https://github.com/kemalcr/kemal/pull/513). Thanks @mamantohoa :pray: - Set `status_code` before response [#513](https://github.com/kemalcr/kemal/pull/513). Thanks @mamantohoa :pray:
- Use Crystal MIME registry. [#516](https://github.com/kemalcr/kemal/pull/516) Thanks @Sija :pray: - Use Crystal MIME registry. [#516](https://github.com/kemalcr/kemal/pull/516) Thanks @Sija :pray:
# 0.25.1 (06-10-2018) # 0.25.1 (06-10-2018)
- Fix `params.files` memoization https://github.com/kemalcr/kemal/pull/503. Thanks @mamantoha :pray: - Fix `params.files` memoization [#503](https://github.com/kemalcr/kemal/pull/503). Thanks @mamantoha :pray:
# 0.25.0 (05-10-2018) # 0.25.0 (05-10-2018)
@ -108,13 +108,13 @@ To test
`curl -F "image1=@/Users/serdar/Downloads/kemal.png" http://localhost:3000/upload` `curl -F "image1=@/Users/serdar/Downloads/kemal.png" http://localhost:3000/upload`
- Cache HTTP routes to increase performance :rocket: https://github.com/kemalcr/kemal/pull/493 - Cache HTTP routes to increase performance :rocket: [#493](https://github.com/kemalcr/kemal/pull/493)
# 0.24.0 (14-08-2018) # 0.24.0 (14-08-2018)
- *[breaking change]* Removed `env.params.files`. You can use Crystal's built-in `HTTP::FormData.parse` instead - *[breaking change]* Removed `env.params.files`. You can use Crystal's built-in `HTTP::FormData.parse` instead:
```ruby ```crystal
post "/upload" do |env| post "/upload" do |env|
HTTP::FormData.parse(env.request) do |upload| HTTP::FormData.parse(env.request) do |upload|
filename = file.filename filename = file.filename
@ -133,19 +133,17 @@ end
- *[breaking change]* From now on to access dynamic url params in a WebSocket route you have to use: - *[breaking change]* From now on to access dynamic url params in a WebSocket route you have to use:
```ruby ```crystal
ws "/:id" do |socket, context| ws "/:id" do |socket, context|
id = context.ws_route_lookup.params["id"] id = context.ws_route_lookup.params["id"]
end end
``` ```
- *[breaking change]* Removed `_method` magic param. - *[breaking change]* Removed `_method` magic param.
- Added new exception page [#466](https://github.com/kemalcr/kemal/pull/466). Thanks @mamantoha 🙏 - Added new exception page [#466](https://github.com/kemalcr/kemal/pull/466). Thanks @mamantoha 🙏
- Support custom port binding. Thanks @straight-shoota 🙏 - Support custom port binding. Thanks @straight-shoota 🙏
```ruby ```crystal
Kemal.run do |config| Kemal.run do |config|
server = config.server.not_nil! server = config.server.not_nil!
server.bind_tcp "127.0.0.1", 3000, reuse_port: true server.bind_tcp "127.0.0.1", 3000, reuse_port: true
@ -169,13 +167,12 @@ end
- Allow videos to be opened with correct mime type. [#406](https://github.com/kemalcr/kemal/pull/406) thanks @crisward 🙏 - Allow videos to be opened with correct mime type. [#406](https://github.com/kemalcr/kemal/pull/406) thanks @crisward 🙏
- Add webm mime type.[#413](https://github.com/kemalcr/kemal/pull/413) thanks @reindeer-cafe 🙏 - Add webm mime type.[#413](https://github.com/kemalcr/kemal/pull/413) thanks @reindeer-cafe 🙏
# 0.21.0 (05-09-2017) # 0.21.0 (05-09-2017)
- Dynamically insert handlers :muscle: Fixes [#376](https://github.com/kemalcr/kemal/pull/376). - Dynamically insert handlers :muscle: Fixes [#376](https://github.com/kemalcr/kemal/pull/376).
- Add context to WebSocket. This allows one to use `HTTP::Server::Context` in `ws` declarations :heart_eyes: Fixes [#349](https://github.com/kemalcr/kemal/pull/349). - Add context to WebSocket. This allows one to use `HTTP::Server::Context` in `ws` declarations :heart_eyes: Fixes [#349](https://github.com/kemalcr/kemal/pull/349).
```ruby ```crystal
ws "/:room_name" do |socket, env| ws "/:room_name" do |socket, env|
env.params.url["room_name"] env.params.url["room_name"]
end end
@ -183,48 +180,47 @@ end
- Add support for customizing the headers of built-in `Kemal::StaticFileHandler` :hammer: Useful for supporting `CORS` for single page applications :clap: - Add support for customizing the headers of built-in `Kemal::StaticFileHandler` :hammer: Useful for supporting `CORS` for single page applications :clap:
```ruby ```crystal
static_headers do |response, filepath, filestat| static_headers do |response, filepath, filestat|
if filepath =~ /\.html$/ if filepath =~ /\.html$/
response.headers.add("Access-Control-Allow-Origin", "*") response.headers.add("Access-Control-Allow-Origin", "*")
end end
response.headers.add("Content-Size", filestat.size.to_s) response.headers.add("Content-Size", filestat.size.to_s)
end end
end
``` ```
- Allow %w in Handler macros [#385](https://github.com/kemalcr/kemal/pull/385). Thanks @will :pray: - Allow `%w` in Handler macros [#385](https://github.com/kemalcr/kemal/pull/385). Thanks @will :pray:
- Security: `X-Content-Type-Options: nosniff` for static files. Fixes [#379](https://github.com/kemalcr/kemal/issues/379). Thanks @crisward :pray:
- Security: X-Content-Type-Options: nosniff for static files. Fixes [#379](https://github.com/kemalcr/kemal/issues/379). Thanks @crisward :pray: - Performance: [Remove tempfile management to OS](https://github.com/kemalcr/kemal/commit/a1520de7ed3865fa73258343a80fad4f20666a99). This brings 10-15% performance boost to Kemal :rocket:
- Performance: [Remove tempfile management to OS](https://github.com/kemalcr/kemal/commit/a1520de7ed3865fa73258343a80fad4f20666a99). This brings %10 - 15 performance boost to Kemal :rocket:
# 0.20.0 (01-07-2017) # 0.20.0 (01-07-2017)
- Crystal 0.23.0 support! As always, Kemal is compatible with the latest major release of Crystal 💎 - Crystal 0.23.0 support! As always, Kemal is compatible with the latest major release of Crystal 💎
- Great news everyone 🎉 All handlers are now completely ***customizable***!. Use the default `Kemal` handlers or go wild, it's all up to you ⛏ - Great news everyone 🎉 All handlers are now completely ***customizable***!. Use the default `Kemal` handlers or go wild, it's all up to you ⛏
```ruby ```crystal
# Don't forget to add `Kemal::RouteHandler::INSTANCE` or your routes won't work! # Don't forget to add `Kemal::RouteHandler::INSTANCE` or your routes won't work!
Kemal.config.handlers = [Kemal::InitHandler.new, YourHandler.new, Kemal::RouteHandler::INSTANCE] Kemal.config.handlers = [Kemal::InitHandler.new, YourHandler.new, Kemal::RouteHandler::INSTANCE]
``` ```
You can also insert a handler into a specific position. You can also insert a handler into a specific position.
```ruby ```crystal
# This adds MyCustomHandler instance to 1 position. Be aware that the index starts from 0. # This adds MyCustomHandler instance to 1 position.
# Be aware that the index starts from 0.
add_handler MyCustomHandler.new, 1 add_handler MyCustomHandler.new, 1
``` ```
- Updated [Kilt](https://github.com/jeromegn/kilt) to v0.4.0. - Updated [Kilt](https://github.com/jeromegn/kilt) to v0.4.0.
- Make `Route` a `Struct`. This improves the performance of route declarations. - Make `Route` a `Struct`. This improves the performance of route declarations.
# 0.19.0 (09-05-2017) # 0.19.0 (09-05-2017)
- Return no body for head route fixes #323. (thanks @crisward) - Return no body for head route fixes [#323](https://github.com/kemalcr/kemal/issues/323). (thanks @crisward)
- Update `radix` to `0.3.8`. (thanks @waghanza) - Update Radix to `v0.3.8`. (thanks @waghanza)
- User defined context store types. (thanks @neovitange) - User defined context store types. (thanks @neovitange)
```ruby ```crystal
class User class User
property name property name
end end
@ -232,8 +228,8 @@ end
add_context_storage_type(User) add_context_storage_type(User)
``` ```
- Prevent `send_file returning filesize. (thanks @crisward) - Prevent `send_file` returning filesize. (thanks @crisward)
- Dont call setup in `config#add_filter_handler` fixes #338. - Don't call setup in `config#add_filter_handler` fixes [#338](https://github.com/kemalcr/kemal/issues/338).
# 0.18.3 (07-03-2017) # 0.18.3 (07-03-2017)
@ -241,16 +237,14 @@ add_context_storage_type(User)
# 0.18.2 (24-02-2017) # 0.18.2 (24-02-2017)
- Fix [Gzip in Kemal Seems broken for static files](https://github.com/kemalcr/kemal/issues/316). This was caused by `Gzip::Writer` in `Crystal 0.21.0` and currently mitigated by monkey patching `Gzip::Header`. - Fix Gzip in Kemal Seems broken for static files [#316](https://github.com/kemalcr/kemal/issues/316). This was caused by `Gzip::Writer` in `Crystal 0.21.0` and currently mitigated by monkey patching `Gzip::Header`.
# 0.18.1 (21-02-2017) # 0.18.1 (21-02-2017)
- Crystal 0.21.0 support - Crystal 0.21.0 support
- Drop `multipart.cr` dependency. `multipart` support is now built-into Crystal <3 - Drop `multipart.cr` dependency. `multipart` support is now built-into Crystal <3
- Since Crystal 0.21.0 comes built-in with `multipart` there are some improvements and deprecations. - Since Crystal 0.21.0 comes built-in with `multipart` there are some improvements and deprecations.
- `meta` has been removed from `FileUpload` and it has the following properties:
`meta` has been removed from `FileUpload` and it has the following properties
+ `tmpfile`: This is temporary file for file upload. Useful for saving the upload file. + `tmpfile`: This is temporary file for file upload. Useful for saving the upload file.
+ `filename`: File name of the file upload. (logo.png, images.zip e.g) + `filename`: File name of the file upload. (logo.png, images.zip e.g)
+ `headers`: Headers for the file upload. + `headers`: Headers for the file upload.
@ -259,18 +253,14 @@ add_context_storage_type(User)
+ `read_time`: Read time of the file upload. + `read_time`: Read time of the file upload.
+ `size`: Size of the file upload. + `size`: Size of the file upload.
# 0.18.0 (11-02-2017) # 0.18.0 (11-02-2017)
- Simpler file upload. File uploads can now be access from `HTTP::Server::Context` like `env.params.files["filename"]`. - Simpler file upload. File uploads can now be access from `HTTP::Server::Context` like `env.params.files["filename"]`, which exposes following properties.
+ `tmpfile`: This is temporary file for file upload. Useful for saving the upload file.
`env.params.files["filename"]` has 5 methods + `tmpfile_path`: File path of `tmpfile`.
+ `filename`: File name of the file upload. (logo.png, images.zip e.g)
- `tmpfile`: This is temporary file for file upload. Useful for saving the upload file. + `meta`: Meta information for the file upload.
- `tmpfile_path`: File path of `tmpfile`. + `headers`: Headers for the file upload.
- `filename`: File name of the file upload. (logo.png, images.zip e.g)
- `meta`: Meta information for the file upload.
- `headers`: Headers for the file upload.
Here's a fully working sample for reading a image file upload `image1` and saving it under `public/uploads`. Here's a fully working sample for reading a image file upload `image1` and saving it under `public/uploads`.
@ -289,10 +279,9 @@ To test
`curl -F "image1=@/Users/serdar/Downloads/kemal.png" http://localhost:3000/upload` `curl -F "image1=@/Users/serdar/Downloads/kemal.png" http://localhost:3000/upload`
- RF7233 support a.k.a file streaming. (https://github.com/kemalcr/kemal/pull/299) (thanks @denysvitali) - RF7233 support a.k.a file streaming. [#299](https://github.com/kemalcr/kemal/pull/299) (thanks @denysvitali)
- Update Radix to 0.3.7. Fixes [#293](https://github.com/kemalcr/kemal/issues/293)
- Update Radix to 0.3.7. Fixes https://github.com/kemalcr/kemal/issues/293 - Configurable startup / shutdown logging. [#291](https://github.com/kemalcr/kemal/issues/291) and [#292](https://github.com/kemalcr/kemal/issues/292) (thanks @twisterghost).
- Configurable startup / shutdown logging. https://github.com/kemalcr/kemal/issues/291 and https://github.com/kemalcr/kemal/issues/292 (thanks @twisterghost).
# 0.17.5 (09-01-2017) # 0.17.5 (09-01-2017)
@ -301,43 +290,38 @@ To test
# 0.17.4 (24-12-2016) # 0.17.4 (24-12-2016)
- Support for Crystal 0.20.3 - Support for Crystal 0.20.3
- Add `Kemal.stop`. Fixes #269. - Add `Kemal.stop`. Fixes [#269](https://github.com/kemalcr/kemal/issues/269).
- `HTTP::Handler` is not a class anymore, it's a module. See https://github.com/crystal-lang/crystal/releases/tag/0.20.3 - `HTTP::Handler` is not a class anymore, it's a module. See https://github.com/crystal-lang/crystal/releases/tag/0.20.3
# 0.17.3 (03-12-2016) # 0.17.3 (03-12-2016)
- Handle missing 404 image. Fixes #263 - Handle missing 404 image. Fixes [#263](https://github.com/kemalcr/kemal/issues/263)
- Remove basic auth middleware from core and move to [kemalcr/kemal-basic-auth](https://github.com/kemalcr/kemal-basic-auth). - Remove basic auth middleware from core and move to [kemalcr/kemal-basic-auth](https://github.com/kemalcr/kemal-basic-auth).
# 0.17.2 (25-11-2016) # 0.17.2 (25-11-2016)
- Use body.gets_to_end for parse_json. Fixes #260. - Use `body.gets_to_end` for `parse_json`. Fixes #260.
- Update Radix to 0.3.5 and lock pessimistically. (thanks @luislavena) - Update Radix to 0.3.5 and lock pessimistically. (thanks @luislavena)
# 0.17.1 (24-11-2016) # 0.17.1 (24-11-2016)
- Treat `HTTP::Request` body as an `IO`. Fixes [#257](https://github.com/sdogruyol/kemal/issues/257) - Treat `HTTP::Request` body as an `IO`. Fixes [#257](https://github.com/kemalcr/kemal/issues/257)
# 0.17.0 (23-11-2016) # 0.17.0 (23-11-2016)
- Reimplemented Request middleware / filter routing. - Reimplemented Request middleware / filter routing.
Now all requests will first go through the Middleware stack then Filters (before_*) and will finally reach the matching route. Now all requests will first go through the Middleware stack then Filters (`before_*`) and will finally reach the matching route.
Which is illustrated as, Which is illustrated as: `Request -> Middleware -> Filter -> Route`
```
Request -> Middleware -> Filter -> Route
```
- Rename `return_with` as `halt`. - Rename `return_with` as `halt`.
- Route declaration must start with `/`. Fixes [#242](https://github.com/sdogruyol/kemal/issues/242) - Route declaration must start with `/`. Fixes [#242](https://github.com/kemalcr/kemal/issues/242)
- Set default exception Content-Type to text/html. Fixes [#202](https://github.com/sdogruyol/kemal/issues/242) - Set default exception `Content-Type` to `text/html`. Fixes [#202](https://github.com/kemalcr/kemal/issues/242)
- Add `only` and `exclude` paths for `Kemal::Handler`. This change requires that all handlers must inherit from `Kemal::Handler`. - Add `only` and `exclude` paths for `Kemal::Handler`. This change requires that all handlers must inherit from `Kemal::Handler`.
For example this handler will only work on `/` path. By default the HTTP method is `GET`. For example this handler will only work on `/` path. By default the HTTP method is `GET`.
```crystal ```crystal
class OnlyHandler < Kemal::Handler class OnlyHandler < Kemal::Handler
only ["/"] only ["/"]
@ -363,8 +347,8 @@ end
``` ```
- Close response on `halt`. (thanks @samueleaton). - Close response on `halt`. (thanks @samueleaton).
- Update `Radix` to `v0.3.4`. - Update Radix to `v0.3.4`.
- `error` handler now also yields error. For example you can get the error mesasage like - `error` handler now also yields error. For example you can get the error mesasage like:
```crystal ```crystal
error 500 do |env, err| error 500 do |env, err|
@ -376,8 +360,7 @@ end
# 0.16.1 (12-10-2016) # 0.16.1 (12-10-2016)
- Improved Multipart support with more info on parsed files. `parse_multipart(env)` now yields - Improved Multipart support with more info on parsed files. `parse_multipart(env)` now yields an `UploadFile` object which has the following properties: `field`, `data`, `meta` and `headers`.
an `UploadFile` object which has the following properties `field`,`data`,`meta`,`headers.
```crystal ```crystal
post "/upload" do |env| post "/upload" do |env|
@ -405,29 +388,29 @@ post "/upload" do |env|
end end
``` ```
- Make session configurable. Now you can specify session name and expire time wit - Make session configurable. Now you can specify session name and expire time with:
```crystal ```crystal
Kemal.config.session["name"] = "your_app" Kemal.config.session["name"] = "your_app"
Kemal.config.session["expire_time"] = 48.hours Kemal.config.session["expire_time"] = 48.hours
``` ```
- Session now supports more types. (String, Int32, Float64, Bool) - Session now supports more types. (`String`, `Int32`, `Float64`, `Bool`)
- Add `gzip` helper to enable / disable gzip compression on responses. - Add `gzip` helper to enable / disable gzip compression on responses.
- Static file caching with etag and gzip (thanks @crisward) - Static file caching with etag and gzip (thanks @crisward)
- `Kemal.run` now accepts port to listen. - `Kemal.run` now accepts port to listen.
# 0.15.1 (05-09-2016) # 0.15.1 (05-09-2016)
- Don't forget to call_next on NullLogHandler - Don't forget to `call_next` on `NullLogHandler`
# 0.15.0 (03-09-2016) # 0.15.0 (03-09-2016)
- Add context store - Add context store.
- `KEMAL_ENV` respects to `Kemal.config.env` and needs to be explicitly set. - `KEMAL_ENV` respects to `Kemal.config.env` and needs to be explicitly set.
- `Kemal::InitHandler` is introduced. Adds initial configuration, headers like `X-Powered-By`. - `Kemal::InitHandler` is introduced. Adds initial configuration, headers like `X-Powered-By`.
- Add `send_file` to helpers. - Add `send_file` to helpers.
- Add mime types. - Add mime types.
- Fix parsing JSON params when "charset" is present in "Content-Type" header. - Fix parsing JSON params when "charset" is present in `Content-Type` header.
- Use http-only cookie for session - Use http-only cookie for session.
- Inject STDOUT by default in CommonLogHandler - Inject `STDOUT` by default in `CommonLogHandler`.