WSAPI is an API that abstracts the web server from Lua web applications.
By coding against WSAPI your application can run on any of the supported
servers and interfaces (currently CGI, FastCGI and Xavante, on Windows
and UNIX-based systems).

WSAPI provides a set of helper libraries that help with request processing and
output buffering. You can also write applications that act as filters that
provide some kind of service to other applications, such as authentication,
file uploads, request isolation, or multiplexing.

Version 1.4 of WSAPI has just been released. Get it at the github download page,
https://github.com/keplerproject/wsapi/downloads, or better yet,
install it using LuaRocks:

luarocks install [wsapi|wsapi-xavante|wsapi-fcgi]

There are also UNIX installer scripts that compile and install Lua
5.1.4, LuaRocks 2.0.3,
and WSAPI-Xavante 1.4 and its dependencies: wsapi-install-1.4
downloads the necessary
packages from the net (see "wsapi-install-1.4 --help" for installation
options), and
wsapi-aio-install-1.4.tar.gz has everything necessary for offline
installation (run
wsapi-install-1.4 inside the directory the tarball unpacks). Both
installers are available in
the github download page, https://github.com/keplerproject/wsapi/downloads.

Changelog:

    * Remove unecessary !# from sapi.lua
    * Added mock WSAPI handler (by Norman Clarke)
    * Flush output pipe after writing content
    * Respect rules specified in config file for "wsapi" launcher
    * Fix bug where common.load_wsapi would not return the module
      if it was already require'd
    * Fix bug where wsapi.ringer would try to close an already closed
      state
    * Refactoring of request, response, and util modules, to work with
mk (http://github.com/keplerproject/mk)
    * New methods for wsapi.request: qs_encode (encodes a table as a
query string), route_link (makes a link to
      a mk route, link (makes an internal app link), absolute_link
(makes an absolute link), static_link (makes
      an external link), empty (checks if a string is just blanks or
nil), empty_param (checks if a request param
      is empty), and renamed parse_post_data method to parse_post
    * New methods for wsapi.response: forward (sets path_info and
returns an mk "keep parsing" code), content_type
      (sets Content-Type header), redirect (sets Location header and
returns redirect WSAPI response), changed
      write to take multiple parameters and flatten nested tables
    * New functions in wsapi.util: make_env_get (makes a mock WSAPI
environment for a GET request from a query
      string), make_env_post (makes a mock WSAPI environment for a
POST request from a postdata string, a postdata
      type, default x-www-form-urlencoded, and a query string)

Binary rocks for Windows will follow shortly.

--
Fabio Mascarenhas

_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to