Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit de560e8

Browse files
committed
Renamed close_connection_after_send to close_connection_after_response, and changed the documentation of this variable slightly
1 parent 600fbe3 commit de560e8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

server_http.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,11 @@ namespace SimpleWeb {
7575
return streambuf.size();
7676
}
7777

78-
/// A resource-handler can set this to true in its Response-object
79-
/// to have the server connection being close by the server after data has been sent.
78+
/// If true, force server to close the connection after the response have been sent.
8079
///
81-
/// This is useful when implementing a HTTP/1.0-server which usually closes the connection
82-
/// after the response has been sent out, without using Content-Length:-header.
83-
bool close_connection_after_send = false;
80+
/// This is useful when implementing a HTTP/1.0-server sending content
81+
/// without specifying the content length.
82+
bool close_connection_after_response = false;
8483
};
8584

8685
class Content : public std::istream {
@@ -401,7 +400,7 @@ namespace SimpleWeb {
401400
return;
402401
}
403402

404-
if (response->close_connection_after_send)
403+
if (response->close_connection_after_response)
405404
return;
406405

407406
auto range=request->header.equal_range("Connection");

0 commit comments

Comments
 (0)