aboutsummaryrefslogtreecommitdiff
path: root/src/cgi.c
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-02-03 19:43:53 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-02-03 19:43:53 +0300
commitc299128eaefc813d1a6acdca8a9c724145686177 (patch)
tree3c0131fa32fe6f29acc88c5b0d934eb76fadd2a3 /src/cgi.c
parent26405332102756912ab2c175874555d6eb8c332f (diff)
downloadmagi-c299128eaefc813d1a6acdca8a9c724145686177.tar
magi-c299128eaefc813d1a6acdca8a9c724145686177.tar.xz
magi-c299128eaefc813d1a6acdca8a9c724145686177.zip
[magi] Readme added + fixes.
Diffstat (limited to 'src/cgi.c')
-rw-r--r--src/cgi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cgi.c b/src/cgi.c
index 6e8c98e..fac6a4a 100644
--- a/src/cgi.c
+++ b/src/cgi.c
@@ -4,11 +4,11 @@
#include "cookies.h"
#include "error.h"
#include "file.h"
+#include "inner_tools.h"
#include "multipart.h"
#include "param.h"
#include "request.h"
#include "urlenc.h"
-#include "utils.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -169,9 +169,9 @@ static char * bound(const char * type)
type += strspn(type, " \t") + 1;
if (*type == '"') {
++type;
- res = magi_str_create_copy(type, strchr(type, '"'));
+ res = magi_str_create_copy(type, type - strchr(type, '"'));
} else {
- res = magi_str_create_copy(type, type + strcspn(type, " \t"));
+ res = magi_str_create_copy(type, strcspn(type, " \t"));
}
}
return res;