<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/d0674978a9a231c0cda3485f112c378fe516cbb6">https://github.com/macports/macports-ports/commit/d0674978a9a231c0cda3485f112c378fe516cbb6</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit d0674978a9a231c0cda3485f112c378fe516cbb6
</span>Author: Peter Newman <peternewman@users.noreply.github.com>
AuthorDate: Sun Nov 22 11:17:03 2020 +0000
<span style='display:block; white-space:pre;color:#404040;'> ola: Remove some patches that aren't required anymore 1
</span>---
net/ola/files/patch-libmicrohttpd-0.9.71.diff | 295 --------------------------
1 file changed, 295 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/ola/files/patch-libmicrohttpd-0.9.71.diff b/net/ola/files/patch-libmicrohttpd-0.9.71.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index f312b6f9912..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/ola/files/patch-libmicrohttpd-0.9.71.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,295 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/common/http/HTTPServer.cpp b/common/http/HTTPServer.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index 455e52bdd..c91ac769f 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/common/http/HTTPServer.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/common/http/HTTPServer.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -88,8 +88,8 @@ const char HTTPServer::CONTENT_TYPE_OCT[] = "application/octet-stream";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * @param key the header name
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * @param value the header value
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--static int AddHeaders(void *cls, OLA_UNUSED enum MHD_ValueKind kind,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- const char *key, const char *value) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+static MHD_RESULT AddHeaders(void *cls, OLA_UNUSED enum MHD_ValueKind kind,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ const char *key, const char *value) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HTTPRequest *request = static_cast<HTTPRequest*>(cls);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- string key_string = key;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- string value_string = value;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -110,11 +110,12 @@ static int AddHeaders(void *cls, OLA_UNUSED enum MHD_ValueKind kind,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * @param off the offset of the data
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * @param size the number of bytes available
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--int IteratePost(void *request_cls, OLA_UNUSED enum MHD_ValueKind kind,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- const char *key, OLA_UNUSED const char *filename,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- OLA_UNUSED const char *content_type,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- OLA_UNUSED const char *transfer_encoding, const char *data,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- OLA_UNUSED uint64_t off, OLA_UNUSED size_t size) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+MHD_RESULT IteratePost(void *request_cls, OLA_UNUSED enum MHD_ValueKind kind,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ const char *key, OLA_UNUSED const char *filename,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ OLA_UNUSED const char *content_type,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ OLA_UNUSED const char *transfer_encoding,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ const char *data,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ OLA_UNUSED uint64_t off, OLA_UNUSED size_t size) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // libmicrohttpd has a bug where the size isn't set correctly.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HTTPRequest *request = static_cast<HTTPRequest*>(request_cls);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- string value(data);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -129,22 +130,23 @@ int IteratePost(void *request_cls, OLA_UNUSED enum MHD_ValueKind kind,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * This sets up HTTPRequest & HTTPResponse objects and then calls
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DispatchRequest.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--static int HandleRequest(void *http_server_ptr,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- struct MHD_Connection *connection,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- const char *url,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- const char *method,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- const char *version,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- const char *upload_data,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- size_t *upload_data_size,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- void **ptr) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+static MHD_RESULT HandleRequest(void *http_server_ptr,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ struct MHD_Connection *connection,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ const char *url,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ const char *method,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ const char *version,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ const char *upload_data,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ size_t *upload_data_size,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ void **ptr) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HTTPServer *http_server = static_cast<HTTPServer*>(http_server_ptr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HTTPRequest *request;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // on the first call ptr is null
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (*ptr == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- request = new HTTPRequest(url, method, version, connection);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (!request)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (!request) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return MHD_NO;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (!request->Init()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete request;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -156,14 +158,16 @@ static int HandleRequest(void *http_server_ptr,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- request = static_cast<HTTPRequest*>(*ptr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (request->InFlight())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (request->InFlight()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // don't dispatch more than once
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return MHD_YES;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (request->Method() == MHD_HTTP_METHOD_GET) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HTTPResponse *response = new HTTPResponse(connection);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- request->SetInFlight();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return http_server->DispatchRequest(request, response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return static_cast<MHD_RESULT>(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ http_server->DispatchRequest(request, response));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else if (request->Method() == MHD_HTTP_METHOD_POST) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (*upload_data_size != 0) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -173,7 +177,8 @@ static int HandleRequest(void *http_server_ptr,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- request->SetInFlight();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HTTPResponse *response = new HTTPResponse(connection);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return http_server->DispatchRequest(request, response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return static_cast<MHD_RESULT>(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ http_server->DispatchRequest(request, response));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return MHD_NO;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -188,8 +193,9 @@ void RequestCompleted(void*,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- struct MHD_Connection*,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- void **request_cls,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- enum MHD_RequestTerminationCode) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (!request_cls)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (!request_cls) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete static_cast<HTTPRequest*>(*request_cls);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *request_cls = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -235,8 +241,9 @@ bool HTTPRequest::Init() {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * @brief Cleanup this request object
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HTTPRequest::~HTTPRequest() {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (m_processor)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (m_processor) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_destroy_post_processor(m_processor);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -286,10 +293,11 @@ void HTTPRequest::ProcessPostData(const char *data, size_t *data_size) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- const string HTTPRequest::GetHeader(const string &key) const {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, string>::const_iterator iter = m_headers.find(key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (iter == m_headers.end())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (iter == m_headers.end()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return "";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return iter->second;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -302,10 +310,11 @@ const string HTTPRequest::GetParameter(const string &key) const {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- const char *value = MHD_lookup_connection_value(m_connection,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_GET_ARGUMENT_KIND,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- key.c_str());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (value)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (value) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return string(value);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return string();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /**
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -339,10 +348,11 @@ bool HTTPRequest::CheckParameterExists(const string &key) const {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- const string HTTPRequest::GetPostParameter(const string &key) const {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, string>::const_iterator iter = m_post_params.find(key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (iter == m_post_params.end())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (iter == m_post_params.end()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return "";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return iter->second;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -386,10 +396,11 @@ int HTTPResponse::SendJson(const JsonValue &json) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- static_cast<void*>(const_cast<char*>(output.data())),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- output.length());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- HeadersMultiMap::const_iterator iter;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- for (iter = m_headers.begin(); iter != m_headers.end(); ++iter)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ for (iter = m_headers.begin(); iter != m_headers.end(); ++iter) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_add_response_header(response,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- iter->first.c_str(),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- iter->second.c_str());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int ret = MHD_queue_response(m_connection, m_status_code, response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_destroy_response(response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ret;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -405,10 +416,11 @@ int HTTPResponse::Send() {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- struct MHD_Response *response = HTTPServer::BuildResponse(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- static_cast<void*>(const_cast<char*>(m_data.data())),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- m_data.length());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- for (iter = m_headers.begin(); iter != m_headers.end(); ++iter)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ for (iter = m_headers.begin(); iter != m_headers.end(); ++iter) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_add_response_header(response,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- iter->first.c_str(),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- iter->second.c_str());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int ret = MHD_queue_response(m_connection, m_status_code, response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_destroy_response(response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ret;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -443,8 +455,9 @@ HTTPServer::~HTTPServer() {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_stop_daemon(m_httpd);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, BaseHTTPCallback*>::const_iterator iter;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete iter->second;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (m_default_handler) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete m_default_handler;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -617,17 +630,20 @@ int HTTPServer::DispatchRequest(const HTTPRequest *request,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, BaseHTTPCallback*>::iterator iter =
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- m_handlers.find(request->Url());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (iter != m_handlers.end())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (iter != m_handlers.end()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return iter->second->Run(request, response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, static_file_info>::iterator file_iter =
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- m_static_content.find(request->Url());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (file_iter != m_static_content.end())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (file_iter != m_static_content.end()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ServeStaticContent(&(file_iter->second), response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (m_default_handler)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (m_default_handler) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return m_default_handler->Run(request, response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ServeNotFound(response);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -642,8 +658,9 @@ int HTTPServer::DispatchRequest(const HTTPRequest *request,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bool HTTPServer::RegisterHandler(const string &path,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- BaseHTTPCallback *handler) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, BaseHTTPCallback*>::const_iterator iter = m_handlers.find(path);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (iter != m_handlers.end())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (iter != m_handlers.end()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return false;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pair<string, BaseHTTPCallback*> pair(path, handler);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- m_handlers.insert(pair);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return true;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -678,8 +695,9 @@ bool HTTPServer::RegisterFile(const std::string &path,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, static_file_info>::const_iterator file_iter = (
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- m_static_content.find(path));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (file_iter != m_static_content.end())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (file_iter != m_static_content.end()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return false;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- static_file_info file_info;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file_info.file_path = file;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -706,13 +724,15 @@ void HTTPServer::RegisterDefaultHandler(BaseHTTPCallback *handler) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- void HTTPServer::Handlers(vector<string> *handlers) const {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, BaseHTTPCallback*>::const_iterator iter;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- handlers->push_back(iter->first);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- map<string, static_file_info>::const_iterator file_iter;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for (file_iter = m_static_content.begin();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- file_iter != m_static_content.end(); ++file_iter)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ file_iter != m_static_content.end(); ++file_iter) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- handlers->push_back(file_iter->first);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /**
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -806,10 +826,11 @@ int HTTPServer::ServeStaticContent(static_file_info *file_info,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- struct MHD_Response *mhd_response = BuildResponse(static_cast<void*>(data),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- length);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (!file_info->content_type.empty())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (!file_info->content_type.empty()) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_add_response_header(mhd_response,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_HTTP_HEADER_CONTENT_TYPE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file_info->content_type.c_str());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int ret = MHD_queue_response(response->Connection(),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MHD_HTTP_OK,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/include/ola/http/HTTPServer.h b/include/ola/http/HTTPServer.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index 0ec37e3a5..560d30ca2 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/include/ola/http/HTTPServer.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/include/ola/http/HTTPServer.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -45,6 +45,17 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <string>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <vector>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// Beginning with v0.9.71, libmicrohttpd changed the return type of most
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// functions from int to enum MHD_Result
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// https://git.gnunet.org/gnunet.git/tree/src/include/gnunet_mhd_compat.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// proposes to define a constant for the return type so it works well
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// with all versions of libmicrohttpd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#if MHD_VERSION >= 0x00097002
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define MHD_RESULT enum MHD_Result
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define MHD_RESULT int
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- namespace ola {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- namespace http {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span></pre><pre style='margin:0'>
</pre>