Преглед изворни кода

Merge branch 'master' of https://github.com/civetweb/civetweb

bel2125 пре 5 година
родитељ
комит
255c0cd8c4
2 измењених фајлова са 19 додато и 2 уклоњено
  1. 13 0
      docs/Installing.md
  2. 6 2
      src/civetweb.c

+ 13 - 0
docs/Installing.md

@@ -17,6 +17,19 @@ Instructions for adding SSL support can be found in [https://github.com/civetweb
 2. Download latest *civetweb-win.zip* from [SourceForge](https://sourceforge.net/projects/civetweb/files/)
 2. Download latest *civetweb-win.zip* from [SourceForge](https://sourceforge.net/projects/civetweb/files/)
 3. When started, Civetweb puts itself into the tray.
 3. When started, Civetweb puts itself into the tray.
 
 
+Building civetweb - Using vcpkg
+---
+
+You can download and install civetweb using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
+
+    git clone https://github.com/Microsoft/vcpkg.git
+    cd vcpkg
+    ./bootstrap-vcpkg.sh
+    ./vcpkg integrate install
+    ./vcpkg install civetweb
+
+The civetweb port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
+
 OS X
 OS X
 ---
 ---
 
 

+ 6 - 2
src/civetweb.c

@@ -14039,7 +14039,9 @@ handle_request(struct mg_connection *conn)
 			/* callback already processed the request. Store the
 			/* callback already processed the request. Store the
 			   return value as a status code for the access log. */
 			   return value as a status code for the access log. */
 			conn->status_code = i;
 			conn->status_code = i;
-			discard_unread_request_data(conn);
+			if (!conn->must_close) {
+				discard_unread_request_data(conn);
+			}
 			return;
 			return;
 		} else if (i == 0) {
 		} else if (i == 0) {
 			/* civetweb should process the request */
 			/* civetweb should process the request */
@@ -14236,7 +14238,9 @@ handle_request(struct mg_connection *conn)
 				 * then return value as status code for the log and discard
 				 * then return value as status code for the log and discard
 				 * all data from the client not used by the callback. */
 				 * all data from the client not used by the callback. */
 				conn->status_code = i;
 				conn->status_code = i;
-				discard_unread_request_data(conn);
+				if (!conn->must_close) {
+					discard_unread_request_data(conn);
+				}
 			} else {
 			} else {
 				/* The handler did NOT handle the request. */
 				/* The handler did NOT handle the request. */
 				/* Some proper reactions would be:
 				/* Some proper reactions would be: