{"id":33180138,"url":"https://keplerproject.github.io/wsapi/","last_synced_at":"2025-11-16T07:00:55.471Z","repository":{"id":670191,"uuid":"313490","full_name":"keplerproject/wsapi","owner":"keplerproject","description":"WSAPI is an API that abstracts the web server from Lua web applications.","archived":false,"fork":false,"pushed_at":"2023-07-10T14:14:00.000Z","size":463,"stargazers_count":76,"open_issues_count":17,"forks_count":34,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-27T08:54:59.350Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://keplerproject.github.io/wsapi","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keplerproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2009-09-21T18:54:56.000Z","updated_at":"2025-04-09T22:31:13.000Z","dependencies_parsed_at":"2024-01-17T07:02:14.291Z","dependency_job_id":"d8091d14-b702-48c5-950f-a5ed8b634873","html_url":"https://github.com/keplerproject/wsapi","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/keplerproject/wsapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplerproject%2Fwsapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplerproject%2Fwsapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplerproject%2Fwsapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplerproject%2Fwsapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keplerproject","download_url":"https://codeload.github.com/keplerproject/wsapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplerproject%2Fwsapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284672648,"owners_count":27044736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-16T02:00:05.974Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-16T03:00:39.950Z","updated_at":"2025-11-16T07:00:55.443Z","avatar_url":"https://github.com/keplerproject.png","language":"Lua","readme":"# WSAPI\n\n## Overview\n\nWSAPI is an API that abstracts the web server from Lua web applications.\nBy coding against WSAPI your application can run on any of the supported\nservers and interfaces (currently CGI, FastCGI and Xavante, on Windows\nand UNIX-based systems).\n\nWSAPI provides a set of helper libraries that help with request processing and\noutput buffering. You can also write applications that act as filters that\nprovide some kind of service to other applications, such as authentication,\nfile uploads, request isolation, or multiplexing.\n\nWSAPI's main influence is Ruby's Rack framework, but it was also influenced\nby Python's WSGI (PEP 333). It's not a direct clone of either of them, though, \nand tries to follow standard Lua idioms.\n\nWSAPI is free software and uses the same license as Lua 5.1\n\n## Status\nCurrent version is 1.6.1. It supports both Lua 5.1 and Lua 5.2.\n\n## Download\nWSAPI can be downloaded from its LuaForge page. You can also get WSAPI using\nLuaRocks:\n\n    luarocks install wsapi\n\n## Latest Sources and Bug Tracker\nWSAPI CVS and bug tracker are available at its Github page.\n\n# History\n\n## WSAPI 1.7 [26/Feb/2018]\n\n* Lua 5.3 compatibility\n* Refactor coxpcall dependency\n\n## WSAPI 1.6.1 [21/Mar/2014]\n* Restores Lua 5.1 compatibility (incorrect usage of coxpcall)\n* Improvements to wsapi.mock\n* wsapi.request.qs_encode produces proper querystrings\n* FastCGI fixes\n* Additional options for cookies such as httponly and max age.\n\n## WSAPI 1.6 [30/Jan/2013]\n* Lua 5.2 compatibility\n\n## WSAPI 1.5 [21/Apr/2011]\n* Add lfcgi.finish() to lfcgi, to close the current FastCGI request\n  in case the application does not want to call lfcgi.accept() right away\n* Fix response headers in sapi.lua\n* Fix reloading in non-isolated launchers\n* Errors in mock handler now go in response.wsapi_errors\n\n## WSAPI 1.4 [19/Nov/2010]\n* Remove unecessary !# from sapi.lua\n* Added mock WSAPI handler (by Norman Clarke)\n* Flush output pipe after writing content\n* Respect rules specified in config file for \"wsapi\" launcher\n* Fix bug where common.load_wsapi would not return the module\n  if it was already require'd\n* Fix bug where wsapi.ringer would try to close an already closed\n  state\n* Refactoring of request, response, and util modules, to work with mk (http://github.com/keplerproject/mk)\n* New methods for wsapi.request: qs_encode (encodes a table as a query string), route_link (makes a link to\n  a mk route, link (makes an internal app link), absolute_link (makes an absolute link), static_link (makes\n  an external link), empty (checks if a string is just blanks or nil), empty_param (checks if a request param\n  is empty), and renamed parse_post_data method to parse_post\n* New methods for wsapi.response: forward (sets path_info and returns an mk \"keep parsing\" code), content_type\n  (sets Content-Type header), redirect (sets Location header and returns redirect WSAPI response), changed\n  write to take multiple parameters and flatten nested tables\n* New functions in wsapi.util: make_env_get (makes a mock WSAPI environment for a GET request from a query\n  string), make_env_post (makes a mock WSAPI environment for a POST request from a postdata string, a postdata\n  type, default x-www-form-urlencoded, and a query string)\n\n## WSAPI 1.3.4 [23/Mar/2010]\n* Bugfix release, fix bug introduced by previous fix :-)\n\n## WSAPI 1.3.3 [22/Mar/2010]\n* Bugfix release, fix memory leak with reload option for persistent loaders\n\n## WSAPI 1.3.2 [19/Mar/2010]\n* Bugfix release, do not send Transfer-Encoding header unless it is\n  raw HTTP response\n\n## WSAPI 1.3.1 [19/Mar/2010]\n* Bugfix release, fix the unknown symbol in lfcgi.getenv()\n\n## WSAPI 1.3 [18/Mar/2010]\n* Fixed segmentation fault when non-string is provided to lfcgi.getenv() (thanks to mkottman@github)\n* Added CGILua bootstrap to wsapi.sapi, so CGILua can run without a kepler_init module present\n* Added an `extra_vars` paremeter to wsapi.xavante.makeHandler and wsapi.xavante.makeGenericHandler, to\n  let you pass extra variables in the WSAPI environment\n* Added `overwrite` option to wsapi.request that tells the parameter parser to overwrite repeated parameters\n  instead of collecting them in a list\n* Added a parameter `isolated` to the persistent generic loaders that controls whether you isolate\n  each script in a Lua state or not\n* Added parameters to the persistent generic loaders that let the user control the life cycle of Lua\n  states: `period` sets how long WSAPI should wait between collecting stale states, and `ttl` sets the\n  period after which a state becomes stale\n* Fixed bug in wsapi.ringer that didn't let you use wsapi.input:read inside the response iterator\n* Parameter `vars` for the WSAPI generic loaders that which variables WSAPI should check to get the physical\n  path of the script, and in which order. Defaults to trying SCRIPT_FILENAME first and PATH_TRANSLATED second\n\n## WSAPI 1.2 [27/Oct/2009]\n* Adds time-based collection of Lua states to FCGI and Xavante launchers\n* Adds \"wsapi\" laucher script, to start a Xavante WSAPI server\n* Fixed \"undefined media type\" error\n* Added is_empty utility function to check if a string is nil or ''\n* Fixed bug with empty bodies in wsapi.xavante, and added full http status codes to responses\n* Changing order of evaluating PATH_TRANSLATED and SCRIPT_FILENAME, to make non-wrapped launchers work in OSX Apache\n* Reload support for load_isolated_launcher\n\n## WSAPI 1.1 [04/Feb/2009]\n* Adds options table to wsapi.request.new, *delay_post* option delays POST processing until req:parsepostdata() is called\n* Moves call to lfs.setmode from wsapi.common to wsapi.cgi\n* 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\n* Correctly handles PATH_TRANSLATED and SCRIPT_FILENAME in case the web server gets creative\n* Statically links the FastCGI version on Windows\n\n## WSAPI 1.0 [18/May/2008]\n* First public version.\n* Includes CGI, FastCGI and Xavante WSAPI connectors.\n\n# Credits#\n\nWSAPI was designed and developed by Fabio Mascarenhas and Andre Carregal,\nand is maintained by Fabio Mascarenhas.\n\nFor more information please check the HTML documentation at /doc/us\n","funding_links":[],"categories":["Web Frameworks","Inspiration"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/keplerproject.github.io%2Fwsapi%2F","html_url":"https://awesome.ecosyste.ms/projects/keplerproject.github.io%2Fwsapi%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/keplerproject.github.io%2Fwsapi%2F/lists"}