webmcp
diff framework/cgi-bin/webmcp.lua @ 11:d76a8857ba62
Added ui.partial and other functions, which allow partial content replacement using XMLHttpRequests; Image support for ui.link
Also includes following changes:
- Fix for rocketcgi library to accept POST data content-types, which contain additional charset information.
- Support arrays passed as params to encode.url (only for keys ending with "[]")
- Version information changed to "1.0.7"
Documentation for added functions is not yet complete.
Also includes following changes:
- Fix for rocketcgi library to accept POST data content-types, which contain additional charset information.
- Support arrays passed as params to encode.url (only for keys ending with "[]")
- Version information changed to "1.0.7"
Documentation for added functions is not yet complete.
author | jbe/bsw |
---|---|
date | Fri Feb 12 18:40:22 2010 +0100 (2010-02-12) |
parents | 5cba83b3f411 |
children | a29c8ffb3f82 |
line diff
1.1 --- a/framework/cgi-bin/webmcp.lua Wed Feb 03 00:57:18 2010 +0100 1.2 +++ b/framework/cgi-bin/webmcp.lua Fri Feb 12 18:40:22 2010 +0100 1.3 @@ -1,6 +1,6 @@ 1.4 #!/usr/bin/env lua 1.5 1.6 -_WEBMCP_VERSION = "1.0.6" 1.7 +_WEBMCP_VERSION = "1.0.7" 1.8 1.9 -- include "../lib/" in search path for libraries 1.10 do 1.11 @@ -388,7 +388,7 @@ 1.12 if not success then 1.13 local errobj = error_info.errobj 1.14 local stacktrace = error_info.stacktrace 1.15 - if not request.get_status() then 1.16 + if not request.get_status() and not request.get_json_request_slots() then 1.17 request.set_status("500 Internal Server Error") 1.18 end 1.19 slot.set_layout('system_error') 1.20 @@ -417,6 +417,10 @@ 1.21 if slot_dump ~= "" then 1.22 redirect_params.tempstore = tempstore.save(slot_dump) 1.23 end 1.24 + local json_request_slots = request.get_json_request_slots() 1.25 + if json_request_slots then 1.26 + redirect_params["_webmcp_json_slots[]"] = json_request_slots 1.27 + end 1.28 cgi.redirect( 1.29 encode.url{ 1.30 base = request.get_absolute_baseurl(),