From de560e8b4811369d4608c4c6170378c9bf009a77 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 24 Jan 2017 14:18:41 +0100 Subject: [PATCH] Renamed close_connection_after_send to close_connection_after_response, and changed the documentation of this variable slightly --- server_http.hpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/server_http.hpp b/server_http.hpp index 9d55e1c..4045708 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -75,12 +75,11 @@ namespace SimpleWeb { return streambuf.size(); } - /// A resource-handler can set this to true in its Response-object - /// to have the server connection being close by the server after data has been sent. + /// If true, force server to close the connection after the response have been sent. /// - /// This is useful when implementing a HTTP/1.0-server which usually closes the connection - /// after the response has been sent out, without using Content-Length:-header. - bool close_connection_after_send = false; + /// This is useful when implementing a HTTP/1.0-server sending content + /// without specifying the content length. + bool close_connection_after_response = false; }; class Content : public std::istream { @@ -401,7 +400,7 @@ namespace SimpleWeb { return; } - if (response->close_connection_after_send) + if (response->close_connection_after_response) return; auto range=request->header.equal_range("Connection");