- (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:
Jocelyn Fiat
2011-11-25 20:43:04 +01:00
parent e0ec84611e
commit cdfc6851e7
15 changed files with 78 additions and 38 deletions

View File

@@ -20,7 +20,8 @@ feature {NONE} -- Initialization
execute (req: WGI_REQUEST; res: WGI_RESPONSE)
do
res.write_header (200, <<["Content-Type", "text/plain"]>>)
res.set_status_code (200)
res.write_header_lines (<<["Content-Type: text/plain"]>>)
res.write_string ("Hello World!%N")
end