# HG changeset patch # User jbe # Date 1425169743 -3600 # Node ID 3db6f3ad070359858a3a0ffe7c96b60be1003820 # Parent bcb3aed3a71e5da1f4efc0b7bf984997a5f9b3ba Allow illegal routes diff -r bcb3aed3a71e -r 3db6f3ad0703 framework/env/request/get_path.lua --- a/framework/env/request/get_path.lua Sun Mar 01 00:12:48 2015 +0100 +++ b/framework/env/request/get_path.lua Sun Mar 01 01:29:03 2015 +0100 @@ -2,14 +2,10 @@ path = request.get_path() -Returns the path in the URL of the request. +Returns the path in the URL of the request. May return nil for a HTTP OPTIONS request with "*" target. --]]-- function request.get_path() - local path = request._http_request.path - if not path then - error("No valid path for HTTP request") - end - return path + return request._http_request.path end diff -r bcb3aed3a71e -r 3db6f3ad0703 framework/env/request/handler.lua --- a/framework/env/request/handler.lua Sun Mar 01 00:12:48 2015 +0100 +++ b/framework/env/request/handler.lua Sun Mar 01 01:29:03 2015 +0100 @@ -19,7 +19,7 @@ else request._relative_baseurl = nil end - request._route = request.router() + request._route = request.router() or {} request.process() end