webmcp
changeset 96:db4bf2e6513c
Fixed errors in sample webserver configurations and request/__init.lua
author | jbe |
---|---|
date | Wed Oct 10 18:41:11 2012 +0200 (2012-10-10) |
parents | df9a192d36d5 |
children | 52305ec73d47 |
files | doc/apache.sample.conf doc/lighttpd.sample.conf framework/env/request/__init.lua |
line diff
1.1 --- a/doc/apache.sample.conf Wed Oct 10 18:29:08 2012 +0200 1.2 +++ b/doc/apache.sample.conf Wed Oct 10 18:41:11 2012 +0200 1.3 @@ -5,7 +5,7 @@ 1.4 # do not rewrite static URLs 1.5 RewriteRule ^/webmcp-demo/static/(.*)$ /webmcp-demo/static/$1 1.6 # dynamic URLs 1.7 -RewriteRule ^/webmcp-demo/([^\?]+)/(\?(.*))?$ /webmcp-demo/webmcp-wrapper.lua?_webmcp_path=$1&$2 1.8 +RewriteRule ^/webmcp-demo/([^\?]*)(\?(.*))?$ /webmcp-demo/webmcp-wrapper.lua?_webmcp_path=$1&$2 1.9 1.10 # Directly serve static files 1.11 Alias /webmcp-demo/static /__INSERT_LOCAL_FILE_PATH_TO_DEMO_APPLICATION_HERE__/static
2.1 --- a/doc/lighttpd.sample.conf Wed Oct 10 18:29:08 2012 +0200 2.2 +++ b/doc/lighttpd.sample.conf Wed Oct 10 18:41:11 2012 +0200 2.3 @@ -30,7 +30,7 @@ 2.4 "/webmcp-demo/static/$1", 2.5 2.6 # dynamic URLs 2.7 - "^/webmcp-demo/([^\?])(\?(.*))?$" => 2.8 + "^/webmcp-demo/([^\?]*)(\?(.*))?$" => 2.9 "/webmcp-demo/webmcp-wrapper.lua?_webmcp_path=$1&$2", 2.10 2.11 )
3.1 --- a/framework/env/request/__init.lua Wed Oct 10 18:29:08 2012 +0200 3.2 +++ b/framework/env/request/__init.lua Wed Oct 10 18:41:11 2012 +0200 3.3 @@ -25,6 +25,7 @@ 3.4 request._module = "index" 3.5 request._view = "index" 3.6 depth = 0 3.7 + return 3.8 end 3.9 module = string.match(path, "^([^/]+)/$") 3.10 if module then 3.11 @@ -65,8 +66,8 @@ 3.12 request._view = cgi.params._webmcp_view 3.13 request._suffix = cgi.params._webmcp_suffix 3.14 request._id = cgi.params._webmcp_id 3.15 + depth = tonumber(cgi.params._webmcp_urldepth) 3.16 end 3.17 - depth = tonumber(cgi.params._webmcp_urldepth) 3.18 end 3.19 if depth and depth > 0 then 3.20 local elements = {}