aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-03-20 23:06:46 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-03-20 23:06:46 +0300
commit8acbd33a82d2c13e70eb17447bc6abfd86cf9512 (patch)
treef89d1c6ec04e3ba418b63c37202d6abc4f08138e /examples
parentfcffb003f36a4357b6ba88e6b5e2239d7d111a6a (diff)
downloadmagi-8acbd33a82d2c13e70eb17447bc6abfd86cf9512.tar
magi-8acbd33a82d2c13e70eb17447bc6abfd86cf9512.tar.xz
magi-8acbd33a82d2c13e70eb17447bc6abfd86cf9512.zip
[magi]
Diffstat (limited to 'examples')
-rw-r--r--examples/fastcgi.c (renamed from examples/fastcgi.todo)3
-rw-r--r--examples/upload.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/examples/fastcgi.todo b/examples/fastcgi.c
index 5d3c4b1..16668f3 100644
--- a/examples/fastcgi.todo
+++ b/examples/fastcgi.c
@@ -12,13 +12,12 @@ void response(magi_request *r)
"</html>");
}
-int main(int argc, char const *argv[])
+int main()
{
magi_session session;
magi_request request;
magi_request_init(&request);
magi_session_init(&session);
- magi_session_inet(&session, "localhost", "9973");
magi_session_unix(&session, "unix.sock");
while (magi_fastcgi(&session, &request)) {
if (request.error) {
diff --git a/examples/upload.c b/examples/upload.c
index 9a16dd1..bf8eed1 100644
--- a/examples/upload.c
+++ b/examples/upload.c
@@ -4,8 +4,8 @@
void response(magi_request *r)
{
- char *name = magi_request_param(r, "name");
- magi_file *data = magi_request_file(r, "data");
+ char *name = magi_request_param(r, "name");
+ const magi_file *data = magi_request_file(r, "data");
magi_response(r,
"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' "
"'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>"