changeset 3171:81cd9a4f3018

always add HTTP header "Connection: close" if keep-alive is disabled
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 27 Jan 2019 15:59:36 +0100
parents 04336d6da2c6
children 096f4a29f223
files Core/HttpServer/HttpOutput.cpp
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Core/HttpServer/HttpOutput.cpp	Fri Jan 25 16:43:24 2019 +0100
+++ b/Core/HttpServer/HttpOutput.cpp	Sun Jan 27 15:59:36 2019 +0100
@@ -177,6 +177,10 @@
       {
         s += "Connection: keep-alive\r\n";
       }
+      else
+      {
+        s += "Connection: close\r\n";
+      }
 
       for (std::list<std::string>::const_iterator
              it = headers_.begin(); it != headers_.end(); ++it)
@@ -435,6 +439,10 @@
       header += "Connection: close\r\n";
 #endif
     }
+    else
+    {
+      header += "Connection: close\r\n";
+    }
 
     // Possibly add the cookies
     for (std::list<std::string>::const_iterator