webmcp
changeset 275:ee7fcdade91d
Allow POST param "_webmcp_id" to overwrite/set the id field in routing information
author | jbe |
---|---|
date | Sat Mar 21 15:21:03 2015 +0100 (2015-03-21) |
parents | d22b58cafebf |
children | bac6cbdeb055 |
files | framework/env/request/handler.lua |
line diff
1.1 --- a/framework/env/request/handler.lua Sat Mar 21 14:37:32 2015 +0100 1.2 +++ b/framework/env/request/handler.lua Sat Mar 21 15:21:03 2015 +0100 1.3 @@ -39,6 +39,12 @@ 1.4 request._relative_baseurl = nil 1.5 end 1.6 request._route = request.router() or {} 1.7 + do 1.8 + local post_id = http_request.post_params["_webmcp_id"] 1.9 + if post_id then 1.10 + request._route.id = post_id 1.11 + end 1.12 + end 1.13 1.14 if close then 1.15 request.add_header("Connection", "close")