Renamed close_connection_after_send to close_connection_after_response, and changed the documentation of this variable slightly
This commit is contained in:
parent
600fbe39b2
commit
de560e8b48
1 changed files with 5 additions and 6 deletions
|
|
@ -75,12 +75,11 @@ namespace SimpleWeb {
|
||||||
return streambuf.size();
|
return streambuf.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A resource-handler can set this to true in its Response-object
|
/// If true, force server to close the connection after the response have been sent.
|
||||||
/// to have the server connection being close by the server after data has been sent.
|
|
||||||
///
|
///
|
||||||
/// This is useful when implementing a HTTP/1.0-server which usually closes the connection
|
/// This is useful when implementing a HTTP/1.0-server sending content
|
||||||
/// after the response has been sent out, without using Content-Length:-header.
|
/// without specifying the content length.
|
||||||
bool close_connection_after_send = false;
|
bool close_connection_after_response = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Content : public std::istream {
|
class Content : public std::istream {
|
||||||
|
|
@ -401,7 +400,7 @@ namespace SimpleWeb {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response->close_connection_after_send)
|
if (response->close_connection_after_response)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto range=request->header.equal_range("Connection");
|
auto range=request->header.equal_range("Connection");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue