From 38ccdad426a4eaa884727f155ca068880c3cadcd Mon Sep 17 00:00:00 2001 From: Julian Picht Date: Fri, 2 Oct 2015 17:05:41 +0200 Subject: [PATCH 1/3] MHD_HTTP_METHOD_NOT_ACCEPTABLE deprecated use MHD_HTTP_NOT_ACCEPTABLE instead --- src/http_utils.cpp | 2 +- src/webserver.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http_utils.cpp b/src/http_utils.cpp index fec42643..204ebf7f 100644 --- a/src/http_utils.cpp +++ b/src/http_utils.cpp @@ -80,7 +80,7 @@ const int http_utils::http_forbidden = MHD_HTTP_FORBIDDEN; const int http_utils::http_not_found = MHD_HTTP_NOT_FOUND; const int http_utils::http_method_not_allowed = MHD_HTTP_METHOD_NOT_ALLOWED; const int http_utils::http_method_not_acceptable = - MHD_HTTP_METHOD_NOT_ACCEPTABLE; + MHD_HTTP_NOT_ACCEPTABLE; const int http_utils::http_proxy_authentication_required = MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED; const int http_utils::http_request_timeout = MHD_HTTP_REQUEST_TIMEOUT; diff --git a/src/webserver.cpp b/src/webserver.cpp index fdf97ca0..56468271 100644 --- a/src/webserver.cpp +++ b/src/webserver.cpp @@ -853,7 +853,7 @@ int webserver::method_not_acceptable_page (const void *cls, (void *) NOT_METHOD_ERROR, MHD_RESPMEM_PERSISTENT); ret = MHD_queue_response (connection, - MHD_HTTP_METHOD_NOT_ACCEPTABLE, + MHD_HTTP_NOT_ACCEPTABLE, response); MHD_add_response_header (response, MHD_HTTP_HEADER_CONTENT_ENCODING, From 7078ef94a608b87da72ead5ba9c2a6c4b953994d Mon Sep 17 00:00:00 2001 From: Julian Picht Date: Mon, 5 Oct 2015 12:11:40 +0200 Subject: [PATCH 2/3] FIX: src/webserver.cpp pthread_kill call --- src/webserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webserver.cpp b/src/webserver.cpp index d7ed3d1a..7bf1b187 100644 --- a/src/webserver.cpp +++ b/src/webserver.cpp @@ -586,7 +586,7 @@ bool webserver::start(bool blocking) } catch (::httpserver::webserver_exception &e) { this->running = false; for (;i >= 0; --i) { - pthread_kill(&threads[i], 9); + pthread_kill(threads[i], 9); } threads.clear(); throw e; From 587b15f360e6ed421e9db779eaa7d993e0a74d2d Mon Sep 17 00:00:00 2001 From: Julian Picht Date: Wed, 7 Oct 2015 12:42:22 +0200 Subject: [PATCH 3/3] http_resource needs a virtual destructor --- src/httpserver/http_resource.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/httpserver/http_resource.hpp b/src/httpserver/http_resource.hpp index 3755c32d..a9bc020e 100644 --- a/src/httpserver/http_resource.hpp +++ b/src/httpserver/http_resource.hpp @@ -204,7 +204,7 @@ class http_resource /** * Class destructor **/ - ~http_resource() + virtual ~http_resource() { }