Browse Source

Merge pull request #126 from kalphamon/patch-1

In a "bad request" reply, do not send back the content of the request in the reply
bel2125 10 năm trước cách đây
mục cha
commit
edce697f6c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -8806,7 +8806,7 @@ getreq(struct mg_connection *conn, char *ebuf, size_t ebuf_len, int *err)
 	} 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);
+		    ebuf, ebuf_len, "Bad request: [len=%d]", conn->data_len);
 		*err = 400;
 		return 0;
 	} else {