aboutsummaryrefslogtreecommitdiff
path: root/src/cgi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgi.h')
-rw-r--r--src/cgi.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cgi.h b/src/cgi.h
index 6cca424..6101de6 100644
--- a/src/cgi.h
+++ b/src/cgi.h
@@ -1,17 +1,27 @@
#ifndef MAGI_INCLUDED_CGI
#define MAGI_INCLUDED_CGI
+#include "error.h"
#include "request.h"
+#include "response.h"
-/* Constructs request from environment and standard input;
+/* Constructs non-post part of request from environment;
* Returns null only in case of error. */
int magi_request_cgi(struct magi_request * request);
+/* Complete request with post data from standard input;
+ * Returns null only in case of error. */
+int magi_request_resume_cgi(struct magi_request * request);
+
/* Sends response to standard output;
* Returns null only in case of error. */
int magi_response_cgi(struct magi_response * response);
+/* Sends a standart response of Bad Request error to standard output;
+ * Returns null only in case of error. */
+int magi_error_cgi(enum magi_error error);
+
#endif