forked from mirrors/kore
Let http_populate_post() listen to content-type
This commit is contained in:
parent
4a8d8ab7f8
commit
b5e122419b
|
@ -1033,12 +1033,17 @@ http_populate_post(struct http_request *req)
|
|||
ssize_t ret;
|
||||
int i, v;
|
||||
struct kore_buf *body;
|
||||
const char *content;
|
||||
char data[BUFSIZ];
|
||||
char *args[HTTP_MAX_QUERY_ARGS], *val[3], *string;
|
||||
|
||||
if (req->method != HTTP_METHOD_POST)
|
||||
return;
|
||||
|
||||
if (!http_request_header(req, "content-type", &content) ||
|
||||
strcasecmp(content, "application/x-www-form-urlencoded"))
|
||||
return;
|
||||
|
||||
if (req->http_body != NULL) {
|
||||
body = NULL;
|
||||
req->http_body->offset = req->content_length;
|
||||
|
|
Loading…
Reference in New Issue