mirror of
https://github.com/sigmasternchen/CFloor
synced 2025-03-15 04:18:55 +00:00
set connection header to close while keep-alive is not implemented
This commit is contained in:
parent
2deb9e53c3
commit
92c4721f5b
1 changed files with 4 additions and 0 deletions
|
@ -258,6 +258,10 @@ int sendHeader(int statusCode, struct headers* headers, struct request* request)
|
|||
for(int i = 0; i < defaultHeaders.number; i++) {
|
||||
headers_mod(headers, defaultHeaders.headers[i].key, defaultHeaders.headers[i].value);
|
||||
}
|
||||
|
||||
// required by HTTP 1.1 if the connection is not kept open
|
||||
// TODO implement persistent connections
|
||||
headers_mod(headers, "Connection", "close");
|
||||
|
||||
struct connection* connection = (struct connection*) request->_private;
|
||||
int fd = connection->writefd;
|
||||
|
|
Loading…
Reference in a new issue