mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-12 16:50:21 +00:00
Passing PUT content to the event handler
This commit is contained in:
1 parent
872b85b5f2
commit
606eab7f4f
1 file changed
+2
-1
+2
-1
@@ -3922,7 +3922,8 @@ static void open_local_endpoint(struct connection *conn, int skip_user) {
|
|||||||
#if MONGOOSE_POST_SIZE_LIMIT > 1
|
#if MONGOOSE_POST_SIZE_LIMIT > 1
|
||||||
{
|
{
|
||||||
const char *cl = mg_get_header(&conn->mg_conn, "Content-Length");
|
const char *cl = mg_get_header(&conn->mg_conn, "Content-Length");
|
||||||
if (!strcmp(conn->mg_conn.request_method, "POST") &&
|
if ((strcmp(conn->mg_conn.request_method, "POST") == 0 ||
|
||||||
|
strcmp(conn->mg_conn.request_method, "PUT") == 0) &&
|
||||||
(cl == NULL || to64(cl) > MONGOOSE_POST_SIZE_LIMIT)) {
|
(cl == NULL || to64(cl) > MONGOOSE_POST_SIZE_LIMIT)) {
|
||||||
send_http_error(conn, 500, "POST size > %zu",
|
send_http_error(conn, 500, "POST size > %zu",
|
||||||
(size_t) MONGOOSE_POST_SIZE_LIMIT);
|
(size_t) MONGOOSE_POST_SIZE_LIMIT);
|
||||||
|
|||||||
Reference in new issue
Block a user