Use WSF_RESPONSE.put_header_lines (header_object) when possible, instead of put_header_text (header_object.string)
This commit is contained in:
@@ -325,7 +325,7 @@ feature -- Execution
|
|||||||
h.put_content_type_text_html
|
h.put_content_type_text_html
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.ok)
|
res.set_status_code ({HTTP_STATUS_CODE}.ok)
|
||||||
h.put_content_length (s.count)
|
h.put_content_length (s.count)
|
||||||
res.put_header_text (h.string)
|
res.put_header_lines (h)
|
||||||
if not req.request_method.same_string ({HTTP_REQUEST_METHODS}.method_head) then
|
if not req.request_method.same_string ({HTTP_REQUEST_METHODS}.method_head) then
|
||||||
res.put_string (s)
|
res.put_string (s)
|
||||||
end
|
end
|
||||||
@@ -391,7 +391,7 @@ feature -- Execution
|
|||||||
h.put_last_modified (a_utc_date)
|
h.put_last_modified (a_utc_date)
|
||||||
end
|
end
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.not_modified)
|
res.set_status_code ({HTTP_STATUS_CODE}.not_modified)
|
||||||
res.put_header_text (h.string)
|
res.put_header_lines (h)
|
||||||
res.flush
|
res.flush
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ feature -- Execution
|
|||||||
s.append ("Resource %"" + uri + "%" not found%N")
|
s.append ("Resource %"" + uri + "%" not found%N")
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.not_found)
|
res.set_status_code ({HTTP_STATUS_CODE}.not_found)
|
||||||
h.put_content_length (s.count)
|
h.put_content_length (s.count)
|
||||||
res.put_header_text (h.string)
|
res.put_header_lines (h)
|
||||||
res.put_string (s)
|
res.put_string (s)
|
||||||
res.flush
|
res.flush
|
||||||
end
|
end
|
||||||
@@ -429,7 +429,7 @@ feature -- Execution
|
|||||||
s.append ("Resource %"" + uri + "%": Access denied%N")
|
s.append ("Resource %"" + uri + "%": Access denied%N")
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.forbidden)
|
res.set_status_code ({HTTP_STATUS_CODE}.forbidden)
|
||||||
h.put_content_length (s.count)
|
h.put_content_length (s.count)
|
||||||
res.put_header_text (h.string)
|
res.put_header_lines (h)
|
||||||
res.put_string (s)
|
res.put_string (s)
|
||||||
res.flush
|
res.flush
|
||||||
end
|
end
|
||||||
@@ -449,7 +449,7 @@ feature -- Execution
|
|||||||
s.append ("Directory index: Access denied%N")
|
s.append ("Directory index: Access denied%N")
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.forbidden)
|
res.set_status_code ({HTTP_STATUS_CODE}.forbidden)
|
||||||
h.put_content_length (s.count)
|
h.put_content_length (s.count)
|
||||||
res.put_header_text (h.string)
|
res.put_header_lines (h)
|
||||||
res.put_string (s)
|
res.put_string (s)
|
||||||
res.flush
|
res.flush
|
||||||
end
|
end
|
||||||
@@ -628,7 +628,7 @@ feature {NONE} -- implementation: date time
|
|||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
Reference in New Issue
Block a user