removed obsolete call on WSF_RESPONSE.write_..' by using the up-to-date WSF_RESPONSE.put_..'
This commit is contained in:
@@ -177,8 +177,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.bad_request)
|
res.set_status_code ({HTTP_STATUS_CODE}.bad_request)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -192,8 +192,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.precondition_failed)
|
res.set_status_code ({HTTP_STATUS_CODE}.precondition_failed)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
handle_internal_server_error (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
handle_internal_server_error (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
||||||
@@ -206,8 +206,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.internal_server_error)
|
res.set_status_code ({HTTP_STATUS_CODE}.internal_server_error)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
handle_not_implemented (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
handle_not_implemented (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
||||||
@@ -220,8 +220,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.not_implemented)
|
res.set_status_code ({HTTP_STATUS_CODE}.not_implemented)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
handle_method_not_allowed_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
handle_method_not_allowed_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||||
@@ -234,8 +234,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.method_not_allowed)
|
res.set_status_code ({HTTP_STATUS_CODE}.method_not_allowed)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
handle_resource_not_found_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
handle_resource_not_found_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||||
@@ -248,8 +248,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.not_found)
|
res.set_status_code ({HTTP_STATUS_CODE}.not_found)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -264,8 +264,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.not_modified)
|
res.set_status_code ({HTTP_STATUS_CODE}.not_modified)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -279,8 +279,8 @@ feature -- Handle responses
|
|||||||
h.put_content_length (a_description.count)
|
h.put_content_length (a_description.count)
|
||||||
h.put_current_date
|
h.put_current_date
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.conflict)
|
res.set_status_code ({HTTP_STATUS_CODE}.conflict)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (a_description)
|
res.put_string (a_description)
|
||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ feature -- Basic operations
|
|||||||
send_to (res: WSF_RESPONSE)
|
send_to (res: WSF_RESPONSE)
|
||||||
do
|
do
|
||||||
res.set_status_code (status_code)
|
res.set_status_code (status_code)
|
||||||
res.write_header_text (header.string)
|
res.put_header_text (header.string)
|
||||||
if not answer_head_request_method then
|
if not answer_head_request_method then
|
||||||
send_file_content_to (file_name, res)
|
send_file_content_to (file_name, res)
|
||||||
end
|
end
|
||||||
@@ -202,7 +202,7 @@ feature {NONE} -- Implementation: output
|
|||||||
f.exhausted
|
f.exhausted
|
||||||
loop
|
loop
|
||||||
f.read_stream (4_096)
|
f.read_stream (4_096)
|
||||||
res.write_string (f.last_string)
|
res.put_string (f.last_string)
|
||||||
end
|
end
|
||||||
f.close
|
f.close
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ feature -- Output
|
|||||||
h.put_content_type_text_plain
|
h.put_content_type_text_plain
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
if b /= Void then
|
if b /= Void then
|
||||||
res.write_string (b)
|
res.put_string (b)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user