mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Forcing connection close when client disconnects.
This commit is contained in:
parent
62085e5215
commit
36b7c8d60d
@ -4905,6 +4905,7 @@ static int getreq(struct mg_connection *conn, char *ebuf, size_t ebuf_len) {
|
||||
snprintf(ebuf, ebuf_len, "%s", "Request Too Large");
|
||||
} if (conn->request_len <= 0) {
|
||||
snprintf(ebuf, ebuf_len, "%s", "Client closed connection");
|
||||
conn->must_close = 1;
|
||||
} else if (parse_http_message(conn->buf, conn->buf_size,
|
||||
&conn->request_info) <= 0) {
|
||||
snprintf(ebuf, ebuf_len, "Bad request: [%.*s]", conn->data_len, conn->buf);
|
||||
|
Loading…
Reference in New Issue
Block a user