- (WGI|WSF)_RESPONSE(*) renamed write_headers_string as write_header_text
- HTTP_HEADER.string does not have the ending CRLFCRLF .. but just CRLF - WGI_RESPONSE.write_header_text has the responsibility to handle the last blank line CRLF (separating the header from the message) - HTTP_HEADER.string does not set anymore a default content type as text/html - added WGI_RESPONSE.write_header_lines (ITERABLE [TUPLE [name,value: READABLE_STRING_8]] mainly as an helper method, this way the WGI user does not have to know about the CRLF end of line
This commit is contained in:
@@ -158,7 +158,7 @@ feature -- Output
|
||||
send (buf: WSF_RESPONSE)
|
||||
do
|
||||
buf.set_status_code (200)
|
||||
buf.write_headers_string (header_string)
|
||||
buf.write_header_text (header_string)
|
||||
buf.write_string (message_string)
|
||||
end
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ feature -- Output
|
||||
do
|
||||
compute
|
||||
res.set_status_code (200)
|
||||
res.write_headers_string (headers_string)
|
||||
res.write_header_text (headers_string)
|
||||
if attached message as m then
|
||||
res.write_string (m)
|
||||
end
|
||||
|
||||
@@ -88,7 +88,7 @@ feature -- Execution
|
||||
end
|
||||
if not s.is_empty then
|
||||
res.set_status_code ({HTTP_STATUS_CODE}.ok)
|
||||
res.write_headers_string (h.string)
|
||||
res.write_header_text (h.string)
|
||||
res.write_string (s)
|
||||
end
|
||||
else
|
||||
|
||||
@@ -80,7 +80,7 @@ feature -- Execution
|
||||
end
|
||||
|
||||
res.set_status_code (200)
|
||||
res.write_headers_string (h.string)
|
||||
res.write_header_text (h.string)
|
||||
res.write_string (s)
|
||||
end
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ feature -- Execution
|
||||
s.append ("You are being redirected to <a href=%"" + l_redir_url + "%">/doc</a> in 2 seconds ...%N")
|
||||
h.put_content_length (s.count)
|
||||
res.set_status_code ({HTTP_STATUS_CODE}.temp_redirect)
|
||||
res.write_headers_string (h.string)
|
||||
res.write_header_text (h.string)
|
||||
res.write_string (s)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user