mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Bugfix of Issue #180: mg_read() should accept PUT requests.
This commit is contained in:
1 parent
11951a57ff
commit
fb9493a090
3 files changed
+8
-3
No files matched your search
+3
-1
@@ -51,7 +51,9 @@ static void test_get_var(struct mg_connection *conn,
|
||||
var = buf = NULL;
|
||||
cl = mg_get_header(conn, "Content-Length");
|
||||
mg_printf(conn, "cl: %p\n", cl);
|
||||
if (!strcmp(ri->request_method, "POST") && cl != NULL) {
|
||||
printf("reqeust method = %s\n", ri->request_method);
|
||||
if ((!strcmp(ri->request_method, "POST") || !strcmp(ri->request_method, "PUT"))
|
||||
&& cl != NULL) {
|
||||
buf_len = atoi(cl);
|
||||
buf = malloc(buf_len);
|
||||
mg_read(conn, buf, buf_len);
|
||||
|
||||
Reference in new issue
Block a user