aboutsummaryrefslogtreecommitdiff
path: root/readme
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-03-16 19:33:58 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-03-16 19:33:58 +0300
commitd9f19275d0549c4b9c3402e1fd28c71627507557 (patch)
tree0f6130f1eeefc182f93c52c400f0c1b84a3a0eb9 /readme
parentc5d69441bd43ace9d9c2b03a89aa0ed4871c288d (diff)
downloadmagi-d9f19275d0549c4b9c3402e1fd28c71627507557.tar
magi-d9f19275d0549c4b9c3402e1fd28c71627507557.tar.xz
magi-d9f19275d0549c4b9c3402e1fd28c71627507557.zip
[magi]
Diffstat (limited to 'readme')
-rw-r--r--readme52
1 files changed, 0 insertions, 52 deletions
diff --git a/readme b/readme
deleted file mode 100644
index cf90f06..0000000
--- a/readme
+++ /dev/null
@@ -1,52 +0,0 @@
- Description
-Magi Library (libmagi) implements Gateway Interfaces, namely CGI and FastCGI.
-
- Overview
-Magi are free and open-source software: legal info is in the 'license' file.
-They are written in ANSI C, without any dependecies, except for C standard
-library. All source and inner header files are located in the 'src' directory.
-The 'include' directory is intended to be used in your include environment.
-Headers in it contain library interface and its documentation in comments.
-They are in subdirectory 'include/magi', due to their short and simple names.
-If you are not about choosing which header to include and just want everything
-to be included you can '#include <magi.h>'.
-
- Compiling
-Compilation and its options are described in the 'Makefile'.
-Running 'make' produces 'libmagi.a' file, which is precompiled library itself,
-ready to be statically linked into your project.
-
- Examples
-Compilation and its options are described in the local 'examples/Makefile'.
-Running 'make' in the 'examples' directory produces 'append', 'cookie',
-'upload', and 'echo' CGI executables. Descriptions and details are in
-corresponding source files.
-
- Usage
-magi_request analyses incoming request, general workflow is to:
-1. Prepare request for analysis, setup defaults via 'magi_request_setup';
-2. Process non-post part of the CGI request via 'magi_request_cgi';
- (The division of post and non-post analysis comes from the fact that
- post body can be really huge, so you probably will want to specify
- some constraints on it, based on non-post info. For example session id
- from non-post part allowes some users (e.g. admins) to load more in post.)
-3. Process post part of the CGI request via 'magi_request_resume_cgi';
-4. Now you have the full request analysed, so do your work;
-5. And finally, free memory via 'magi_request_destroy'.
-For more see 'include/magi/request.h'.
-
-magi_response provides output capabilities. You can form the response with
-'magi_response_setup' used to setup defaults, and the following functions to
-fill in your data ('...' means 'magi_response_'):
- ...content_type: set Content Type (by default XHTML);
- ...cookie: set HTTP Cookie;
-...cookie_discard: discard HTTP Cookie;
- ...http: setup arbitarary HTTP header;
- ...add: add something to the body;
- ...add_format: add comething to the body, using format (similar to printf);
-Outputting itself can be done with 'magi_response_cgi'.
-To correctly free all occupied memory call 'magi_response_destroy'.
-For more see 'include/magi/response.h'.
-
- Motivation
-Web must be fun.