Skip to content

Commit

Permalink
Use handle_request (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Forgy authored and quinnj committed Apr 29, 2018
1 parent 2a4be43 commit 794b320
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Handlers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ function gethandler(r::Router, req)
return r.func(m, s, h, vals...)
end

function handle(r::Router, req)
function handle(r::Router, req::HTTP.Request)
handler = gethandler(r,req)
# pass the request to the handler and return
return handle(handler, req)
end

handle(hf::HandlerFunction, http::HTTP.Stream) = handle_request(hf.func,http)
handle(h::Handler, http::HTTP.Stream) = HTTP.Servers.handle_request(req->handle(h, req), http) # FIXME: Consider moving

end # module

0 comments on commit 794b320

Please sign in to comment.