Skip to content

Commit e793ef0

Browse files
committed
Reformat the readme
1 parent d472979 commit e793ef0

File tree

1 file changed

+93
-91
lines changed

1 file changed

+93
-91
lines changed

README.md

Lines changed: 93 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# WSAPI#
1+
# WSAPI
22

3-
##Overview#
3+
## Overview
44

55
WSAPI is an API that abstracts the web server from Lua web applications.
66
By coding against WSAPI your application can run on any of the supported
@@ -13,109 +13,111 @@ provide some kind of service to other applications, such as authentication,
1313
file uploads, request isolation, or multiplexing.
1414

1515
WSAPI's main influence is Ruby's Rack framework, but it was also influenced
16-
by Python's WSGI (PEP 333). It's not a direct clone of either of them, though, and tries to follow standard Lua idioms.
16+
by Python's WSGI (PEP 333). It's not a direct clone of either of them, though,
17+
and tries to follow standard Lua idioms.
1718

1819
WSAPI is free software and uses the same license as Lua 5.1
1920

20-
## Status#
21+
## Status
2122
Current version is 1.6.1. It supports both Lua 5.1 and Lua 5.2.
2223

23-
## Download#
24+
## Download
2425
WSAPI can be downloaded from its LuaForge page. You can also get WSAPI using
2526
LuaRocks:
2627

2728
luarocks install wsapi
2829

29-
## Latest Sources and Bug Tracker#
30+
## Latest Sources and Bug Tracker
3031
WSAPI CVS and bug tracker are available at its Github page.
3132

3233
# History
3334

34-
WSAPI 1.6.1 [21/Mar/2014]
35-
* Restores Lua 5.1 compatibility (incorrect usage of coxpcall)
36-
* Improvements to wsapi.mock
37-
* wsapi.request.qs_encode produces proper querystrings
38-
* FastCGI fixes
39-
* Additional options for cookies such as httponly and max age.
40-
41-
WSAPI 1.6 [30/Jan/2013]
42-
* Lua 5.2 compatibility
43-
44-
WSAPI 1.5 [21/Apr/2011]
45-
* Add lfcgi.finish() to lfcgi, to close the current FastCGI request
46-
in case the application does not want to call lfcgi.accept() right away
47-
* Fix response headers in sapi.lua
48-
* Fix reloading in non-isolated launchers
49-
* Errors in mock handler now go in response.wsapi_errors
50-
51-
WSAPI 1.4 [19/Nov/2010]
52-
* Remove unecessary !# from sapi.lua
53-
* Added mock WSAPI handler (by Norman Clarke)
54-
* Flush output pipe after writing content
55-
* Respect rules specified in config file for "wsapi" launcher
56-
* Fix bug where common.load_wsapi would not return the module
57-
if it was already require'd
58-
* Fix bug where wsapi.ringer would try to close an already closed
59-
state
60-
* Refactoring of request, response, and util modules, to work with mk (http://github.com/keplerproject/mk)
61-
* New methods for wsapi.request: qs_encode (encodes a table as a query string), route_link (makes a link to
62-
a mk route, link (makes an internal app link), absolute_link (makes an absolute link), static_link (makes
63-
an external link), empty (checks if a string is just blanks or nil), empty_param (checks if a request param
64-
is empty), and renamed parse_post_data method to parse_post
65-
* New methods for wsapi.response: forward (sets path_info and returns an mk "keep parsing" code), content_type
66-
(sets Content-Type header), redirect (sets Location header and returns redirect WSAPI response), changed
67-
write to take multiple parameters and flatten nested tables
68-
* New functions in wsapi.util: make_env_get (makes a mock WSAPI environment for a GET request from a query
69-
string), make_env_post (makes a mock WSAPI environment for a POST request from a postdata string, a postdata
70-
type, default x-www-form-urlencoded, and a query string)
71-
72-
WSAPI 1.3.4 [23/Mar/2010]
73-
* Bugfix release, fix bug introduced by previous fix :-)
74-
75-
WSAPI 1.3.3 [22/Mar/2010]
76-
* Bugfix release, fix memory leak with reload option for persistent loaders
77-
78-
WSAPI 1.3.2 [19/Mar/2010]
79-
* Bugfix release, do not send Transfer-Encoding header unless it is
80-
raw HTTP response
81-
82-
WSAPI 1.3.1 [19/Mar/2010]
83-
* Bugfix release, fix the unknown symbol in lfcgi.getenv()
84-
85-
WSAPI 1.3 [18/Mar/2010]
86-
* Fixed segmentation fault when non-string is provided to lfcgi.getenv() (thanks to mkottman@github)
87-
* Added CGILua bootstrap to wsapi.sapi, so CGILua can run without a kepler_init module present
88-
* Added an `extra_vars` paremeter to wsapi.xavante.makeHandler and wsapi.xavante.makeGenericHandler, to
89-
let you pass extra variables in the WSAPI environment
90-
* Added `overwrite` option to wsapi.request that tells the parameter parser to overwrite repeated parameters
91-
instead of collecting them in a list
92-
* Added a parameter `isolated` to the persistent generic loaders that controls whether you isolate
93-
each script in a Lua state or not
94-
* Added parameters to the persistent generic loaders that let the user control the life cycle of Lua
95-
states: `period` sets how long WSAPI should wait between collecting stale states, and `ttl` sets the
96-
period after which a state becomes stale
97-
* Fixed bug in wsapi.ringer that didn't let you use wsapi.input:read inside the response iterator
98-
* Parameter `vars` for the WSAPI generic loaders that which variables WSAPI should check to get the physical
99-
path of the script, and in which order. Defaults tro trying SCRIPT_FILENAME first and PATH_TRANSLATED second
100-
101-
WSAPI 1.2 [27/Oct/2009]
102-
* Adds time-based collection of Lua states to FCGI and Xavante launchers
103-
* Adds "wsapi" laucher script, to start a Xavante WSAPI server
104-
* Fixed "undefined media type" error
105-
* Added is_empty utility function to check if a string is nil or ''
106-
* Fixed bug with empty bodies in wsapi.xavante, and added full http status codes to responses
107-
* Changing order of evaluating PATH_TRANSLATED and SCRIPT_FILENAME, to make non-wrapped launchers work in OSX Apache
108-
* Reload support for load_isolated_launcher
109-
110-
WSAPI 1.1 [04/Feb/2009]
111-
* Adds options table to wsapi.request.new, *delay_post* option delays POST processing until req:parsepostdata() is called
112-
* Moves call to lfs.setmode from wsapi.common to wsapi.cgi
113-
* Adds wsapi.util.make_rewindable(wsapi_env) method - wraps wsapi_env in a new environment that lets you process the POST data more than once.
114-
* Correctly handles PATH_TRANSLATED and SCRIPT_FILENAME in case the web server gets creative
115-
* Statically links the FastCGI version on Windows
116-
WSAPI 1.0 [18/May/2008]
117-
* First public version.
118-
* Includes CGI, FastCGI and Xavante WSAPI connectors.
35+
## WSAPI 1.6.1 [21/Mar/2014]
36+
* Restores Lua 5.1 compatibility (incorrect usage of coxpcall)
37+
* Improvements to wsapi.mock
38+
* wsapi.request.qs_encode produces proper querystrings
39+
* FastCGI fixes
40+
* Additional options for cookies such as httponly and max age.
41+
42+
## WSAPI 1.6 [30/Jan/2013]
43+
* Lua 5.2 compatibility
44+
45+
## WSAPI 1.5 [21/Apr/2011]
46+
* Add lfcgi.finish() to lfcgi, to close the current FastCGI request
47+
in case the application does not want to call lfcgi.accept() right away
48+
* Fix response headers in sapi.lua
49+
* Fix reloading in non-isolated launchers
50+
* Errors in mock handler now go in response.wsapi_errors
51+
52+
## WSAPI 1.4 [19/Nov/2010]
53+
* Remove unecessary !# from sapi.lua
54+
* Added mock WSAPI handler (by Norman Clarke)
55+
* Flush output pipe after writing content
56+
* Respect rules specified in config file for "wsapi" launcher
57+
* Fix bug where common.load_wsapi would not return the module
58+
if it was already require'd
59+
* Fix bug where wsapi.ringer would try to close an already closed
60+
state
61+
* Refactoring of request, response, and util modules, to work with mk (http://github.com/keplerproject/mk)
62+
* New methods for wsapi.request: qs_encode (encodes a table as a query string), route_link (makes a link to
63+
a mk route, link (makes an internal app link), absolute_link (makes an absolute link), static_link (makes
64+
an external link), empty (checks if a string is just blanks or nil), empty_param (checks if a request param
65+
is empty), and renamed parse_post_data method to parse_post
66+
* New methods for wsapi.response: forward (sets path_info and returns an mk "keep parsing" code), content_type
67+
(sets Content-Type header), redirect (sets Location header and returns redirect WSAPI response), changed
68+
write to take multiple parameters and flatten nested tables
69+
* New functions in wsapi.util: make_env_get (makes a mock WSAPI environment for a GET request from a query
70+
string), make_env_post (makes a mock WSAPI environment for a POST request from a postdata string, a postdata
71+
type, default x-www-form-urlencoded, and a query string)
72+
73+
## WSAPI 1.3.4 [23/Mar/2010]
74+
* Bugfix release, fix bug introduced by previous fix :-)
75+
76+
## WSAPI 1.3.3 [22/Mar/2010]
77+
* Bugfix release, fix memory leak with reload option for persistent loaders
78+
79+
## WSAPI 1.3.2 [19/Mar/2010]
80+
* Bugfix release, do not send Transfer-Encoding header unless it is
81+
raw HTTP response
82+
83+
## WSAPI 1.3.1 [19/Mar/2010]
84+
* Bugfix release, fix the unknown symbol in lfcgi.getenv()
85+
86+
## WSAPI 1.3 [18/Mar/2010]
87+
* Fixed segmentation fault when non-string is provided to lfcgi.getenv() (thanks to mkottman@github)
88+
* Added CGILua bootstrap to wsapi.sapi, so CGILua can run without a kepler_init module present
89+
* Added an `extra_vars` paremeter to wsapi.xavante.makeHandler and wsapi.xavante.makeGenericHandler, to
90+
let you pass extra variables in the WSAPI environment
91+
* Added `overwrite` option to wsapi.request that tells the parameter parser to overwrite repeated parameters
92+
instead of collecting them in a list
93+
* Added a parameter `isolated` to the persistent generic loaders that controls whether you isolate
94+
each script in a Lua state or not
95+
* Added parameters to the persistent generic loaders that let the user control the life cycle of Lua
96+
states: `period` sets how long WSAPI should wait between collecting stale states, and `ttl` sets the
97+
period after which a state becomes stale
98+
* Fixed bug in wsapi.ringer that didn't let you use wsapi.input:read inside the response iterator
99+
* Parameter `vars` for the WSAPI generic loaders that which variables WSAPI should check to get the physical
100+
path of the script, and in which order. Defaults to trying SCRIPT_FILENAME first and PATH_TRANSLATED second
101+
102+
## WSAPI 1.2 [27/Oct/2009]
103+
* Adds time-based collection of Lua states to FCGI and Xavante launchers
104+
* Adds "wsapi" laucher script, to start a Xavante WSAPI server
105+
* Fixed "undefined media type" error
106+
* Added is_empty utility function to check if a string is nil or ''
107+
* Fixed bug with empty bodies in wsapi.xavante, and added full http status codes to responses
108+
* Changing order of evaluating PATH_TRANSLATED and SCRIPT_FILENAME, to make non-wrapped launchers work in OSX Apache
109+
* Reload support for load_isolated_launcher
110+
111+
## WSAPI 1.1 [04/Feb/2009]
112+
* Adds options table to wsapi.request.new, *delay_post* option delays POST processing until req:parsepostdata() is called
113+
* Moves call to lfs.setmode from wsapi.common to wsapi.cgi
114+
* Adds wsapi.util.make_rewindable(wsapi_env) method - wraps wsapi_env in a new environment that lets you process the POST data more than once.tr
115+
* Correctly handles PATH_TRANSLATED and SCRIPT_FILENAME in case the web server gets creative
116+
* Statically links the FastCGI version on Windows
117+
118+
## WSAPI 1.0 [18/May/2008]
119+
* First public version.
120+
* Includes CGI, FastCGI and Xavante WSAPI connectors.
119121

120122
# Credits#
121123

0 commit comments

Comments
 (0)