This commit is contained in:
sdogruyol 2017-05-08 17:33:19 +03:00
parent e695a491b7
commit 9f01eb90e1
4 changed files with 7 additions and 7 deletions

View file

@ -1,5 +1,5 @@
name: kemal name: kemal
version: 0.18.3 version: 0.19.0
dependencies: dependencies:
radix: radix:

View file

@ -5,7 +5,7 @@
class HTTP::Server class HTTP::Server
class Context class Context
# :nodoc: # :nodoc:
STORE_MAPPINGS = [ Nil, String, Int32, Int64, Float64, Bool ] STORE_MAPPINGS = [Nil, String, Int32, Int64, Float64, Bool]
macro finished macro finished
alias StoreTypes = Union({{ *STORE_MAPPINGS }}) alias StoreTypes = Union({{ *STORE_MAPPINGS }})

View file

@ -21,7 +21,7 @@ module Kemal
# a corresponding `HEAD` route. # a corresponding `HEAD` route.
def add_route(method, path, &handler : HTTP::Server::Context -> _) def add_route(method, path, &handler : HTTP::Server::Context -> _)
add_to_radix_tree method, path, Route.new(method, path, &handler) add_to_radix_tree method, path, Route.new(method, path, &handler)
add_to_radix_tree("HEAD", path, Route.new("HEAD", path) {|ctx| ""}) if method == "GET" add_to_radix_tree("HEAD", path, Route.new("HEAD", path) { |ctx| "" }) if method == "GET"
end end
# Check if a route is defined and returns the lookup # Check if a route is defined and returns the lookup