HTTPS clone URL
Subversion checkout URL
Clone this wiki locally
onion is a lightweight library to help you create webservers in C programming language. These webservers may be a web application, a means of expanding your own application to give it web functionality or even a fully featured webserver.
The user can create new handlers that serve reading data from a file or creating them. However, there are many default handlers included to address the most frequently required needs.
The name onion comes from the idea that the path transversal is being done using many layers of handlers: on one layer you set the auth control, on another you check the server hostname (so that you could have virtual hosts) and on yet another a regular expression sends you across to one or another path... Check on examples for how to do it.
Full API is described at http://coralbits.com/static/onion/ . On this wiki there are some recipes on how to use different parts of the API.
If you plan to learn on how to use onion, first scan through this wiki not centering on the details but on general ideas, then go through the examples and when information on specific functions/structures is needed go to the API documentation.
- Lightweight C library to add a webserver to an existing program, thought to be ABI compatible.
- Provides everything necessary to add full webserver functionality.
- ARM support
- SSL support via gnutls (http://www.gnu.org/software/gnutls/).
- I18N support
- Session support
- Pthread support
- PAM support
- Templating system based on Django's, including otemplate debugging.
- Keep-Alive via Content-Length and Chunk encoding.
- HTTP methods: GET, POST, file upload support
- Console, syslog or custom logging.
- IPv4 and IPv6 support.
- Compile Run Loop Development helper: acts like instantaneus apply of source code modification to your web server.
- C++ and Python bindings.
onion is currently being used on ARM projects and comes with several quite usefull example programs.
onion is licensed under GPLv2 and Apache2 licenses. This allows to use it on any project. If you need consultant help for any project, please check at http://www.coralbits.com, as a commercial support is available.
Examples are under AGPL license.
There is a mailing list at https://groups.google.com/a/coralbits.com/group/onion-dev/topics.
Also feel free to contact us at email@example.com, or use the Issue tracker at github.