From bd9a9ace4ae6da3e6600a58f79b1acb51edc831b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 Nov 2016 16:44:45 +0100 Subject: Use atomic type for connection count shared between threads Even if this variable is only used in debug mode, it's still bad to have data races on it, as it was the case (and reported by thread sanitizer) before. --- include/crow/http_connection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/crow/http_connection.h') diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index 96f2d14..7e0a9f3 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -176,7 +176,7 @@ namespace crow } #ifdef CROW_ENABLE_DEBUG - static int connectionCount; + static std::atomic connectionCount; #endif template class Connection -- cgit v1.2.3-54-g00ecf From 6e4e66ad1233257f6413e643cfb376d2cf298065 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Mon, 4 Sep 2017 16:08:02 +0100 Subject: Add support for HTTP 422 status code See: https://tools.ietf.org/html/rfc4918#section-11.2 --- amalgamate/crow_all.h | 1 + include/crow/http_connection.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include/crow/http_connection.h') diff --git a/amalgamate/crow_all.h b/amalgamate/crow_all.h index 41b06ff..26f0806 100644 --- a/amalgamate/crow_all.h +++ b/amalgamate/crow_all.h @@ -8893,6 +8893,7 @@ namespace crow {401, "HTTP/1.1 401 Unauthorized\r\n"}, {403, "HTTP/1.1 403 Forbidden\r\n"}, {404, "HTTP/1.1 404 Not Found\r\n"}, + {420, "HTTP/1.1 404 Unprocessable Entity\r\n"}, {500, "HTTP/1.1 500 Internal Server Error\r\n"}, {501, "HTTP/1.1 501 Not Implemented\r\n"}, diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index 96f2d14..3ef8089 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -374,6 +374,7 @@ namespace crow {401, "HTTP/1.1 401 Unauthorized\r\n"}, {403, "HTTP/1.1 403 Forbidden\r\n"}, {404, "HTTP/1.1 404 Not Found\r\n"}, + {422, "HTTP/1.1 422 Unprocessable Entity\r\n"}, {500, "HTTP/1.1 500 Internal Server Error\r\n"}, {501, "HTTP/1.1 501 Not Implemented\r\n"}, -- cgit v1.2.3-54-g00ecf From 9a1e4aefddef1010219f7267358b055029488def Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Mon, 4 Sep 2017 16:38:51 +0100 Subject: Revert "Add support for HTTP 422 status code" This reverts commit 6e4e66ad1233257f6413e643cfb376d2cf298065. --- amalgamate/crow_all.h | 1 - include/crow/http_connection.h | 1 - 2 files changed, 2 deletions(-) (limited to 'include/crow/http_connection.h') diff --git a/amalgamate/crow_all.h b/amalgamate/crow_all.h index 26f0806..41b06ff 100644 --- a/amalgamate/crow_all.h +++ b/amalgamate/crow_all.h @@ -8893,7 +8893,6 @@ namespace crow {401, "HTTP/1.1 401 Unauthorized\r\n"}, {403, "HTTP/1.1 403 Forbidden\r\n"}, {404, "HTTP/1.1 404 Not Found\r\n"}, - {420, "HTTP/1.1 404 Unprocessable Entity\r\n"}, {500, "HTTP/1.1 500 Internal Server Error\r\n"}, {501, "HTTP/1.1 501 Not Implemented\r\n"}, diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index 3ef8089..96f2d14 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -374,7 +374,6 @@ namespace crow {401, "HTTP/1.1 401 Unauthorized\r\n"}, {403, "HTTP/1.1 403 Forbidden\r\n"}, {404, "HTTP/1.1 404 Not Found\r\n"}, - {422, "HTTP/1.1 422 Unprocessable Entity\r\n"}, {500, "HTTP/1.1 500 Internal Server Error\r\n"}, {501, "HTTP/1.1 501 Not Implemented\r\n"}, -- cgit v1.2.3-54-g00ecf From 679fe4a8aca06844e3a006da9257dd6bf8a54adf Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Mon, 4 Sep 2017 16:40:40 +0100 Subject: Add support for HTTP 422 status code See: https://tools.ietf.org/html/rfc4918#section-11.2 --- amalgamate/crow_all.h | 1 + include/crow/http_connection.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include/crow/http_connection.h') diff --git a/amalgamate/crow_all.h b/amalgamate/crow_all.h index 41b06ff..bc23f58 100644 --- a/amalgamate/crow_all.h +++ b/amalgamate/crow_all.h @@ -8893,6 +8893,7 @@ namespace crow {401, "HTTP/1.1 401 Unauthorized\r\n"}, {403, "HTTP/1.1 403 Forbidden\r\n"}, {404, "HTTP/1.1 404 Not Found\r\n"}, + {422, "HTTP/1.1 422 Unprocessable Entity\r\n"}, {500, "HTTP/1.1 500 Internal Server Error\r\n"}, {501, "HTTP/1.1 501 Not Implemented\r\n"}, diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index 96f2d14..3ef8089 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -374,6 +374,7 @@ namespace crow {401, "HTTP/1.1 401 Unauthorized\r\n"}, {403, "HTTP/1.1 403 Forbidden\r\n"}, {404, "HTTP/1.1 404 Not Found\r\n"}, + {422, "HTTP/1.1 422 Unprocessable Entity\r\n"}, {500, "HTTP/1.1 500 Internal Server Error\r\n"}, {501, "HTTP/1.1 501 Not Implemented\r\n"}, -- cgit v1.2.3-54-g00ecf