From 724d32c852dabe9cc0bd9262da54593a14453cc9 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Thu, 20 Nov 2014 14:20:54 +0300 Subject: [PATCH] Process "Connection: close" header in non-JSON requests --- src/bitcoinrpc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index e3f500d2..d941d652 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -997,6 +997,9 @@ void ServiceConnection(AcceptedConnection *conn) break; } + if (mapHeaders["connection"] == "close") + fRun = false; + if(strMethod == "GET" && strURI == "/") strURI="/home.html"; @@ -1037,9 +1040,6 @@ void ServiceConnection(AcceptedConnection *conn) continue; } - if (mapHeaders["connection"] == "close") - fRun = false; - if(strMethod == "GET" && strURI.substr(0, 4) == "/rss" && !GetBoolArg("-public_server_mode",false)) { string rssOutput;