Added connection header related functions.

- WSF_REQUEST.is_keep_alive_http_connection: BOOLEAN
  - HTTP_HEADER_MODIFIER.put_connection_keep_alive
  - HTTP_HEADER_MODIFIER.put_connection_close
In Standalone request handler code, better detection of Connection: keep-alive header.
This commit is contained in:
2016-10-18 13:22:32 +02:00
parent 4a47a00747
commit c34f89df9b
7 changed files with 82 additions and 19 deletions

View File

@@ -32,8 +32,8 @@ feature -- Basic operations
response.set_status_code ({HTTP_STATUS_CODE}.ok)
response.header.put_content_type_text_html
response.header.put_content_length (s.count)
if attached request.http_connection as l_connection and then l_connection.is_case_insensitive_equal_general ("keep-alive") then
response.header.put_header_key_value ("Connection", "keep-alive")
if request.is_keep_alive_http_connection then
response.header.put_connection_keep_alive
end
response.put_string (s)
end