diff --git a/draft/library/server/request/rest/src/contrib/doc/html/html_page.e b/draft/library/server/request/rest/src/contrib/doc/html/html_page.e index bf65185b..030b9a1a 100644 --- a/draft/library/server/request/rest/src/contrib/doc/html/html_page.e +++ b/draft/library/server/request/rest/src/contrib/doc/html/html_page.e @@ -158,8 +158,8 @@ feature -- Output send (buf: WSF_RESPONSE) do buf.set_status_code (200) - buf.write_header_text (header_string) - buf.write_string (message_string) + buf.put_header_text (header_string) + buf.put_string (message_string) end feature {NONE} -- Implementation: output diff --git a/draft/library/server/request/rest/src/response/rest_response.e b/draft/library/server/request/rest/src/response/rest_response.e index c024d09d..d098867d 100644 --- a/draft/library/server/request/rest/src/response/rest_response.e +++ b/draft/library/server/request/rest/src/response/rest_response.e @@ -133,9 +133,9 @@ feature -- Output do compute res.set_status_code (200) - res.write_header_text (headers_string) + res.put_header_text (headers_string) if attached message as m then - res.write_string (m) + res.put_string (m) end end diff --git a/draft/library/server/request/rest/src/rest_request_handler.e b/draft/library/server/request/rest/src/rest_request_handler.e index 66586260..0f8795e5 100644 --- a/draft/library/server/request/rest/src/rest_request_handler.e +++ b/draft/library/server/request/rest/src/rest_request_handler.e @@ -80,8 +80,8 @@ feature -- Execution execute_unauthorized (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE) do res.set_status_code ({HTTP_STATUS_CODE}.unauthorized) - res.write_header ({HTTP_STATUS_CODE}.unauthorized, Void) - res.write_string ("Unauthorized") + res.put_header ({HTTP_STATUS_CODE}.unauthorized, Void) + res.put_string ("Unauthorized") end feature -- Auth diff --git a/library/server/wsf/router/misc/routed_service_helper.e b/library/server/wsf/router/misc/routed_service_helper.e index ac0524d2..585e7603 100644 --- a/library/server/wsf/router/misc/routed_service_helper.e +++ b/library/server/wsf/router/misc/routed_service_helper.e @@ -53,12 +53,12 @@ feature -- Helper end end res.set_status_code ({HTTP_STATUS_CODE}.unsupported_media_type) - res.write_header ({HTTP_STATUS_CODE}.unsupported_media_type, << ["Content-Type", "text/plain"], ["Accept", accept_s]>>) + res.put_header ({HTTP_STATUS_CODE}.unsupported_media_type, << ["Content-Type", "text/plain"], ["Accept", accept_s]>>) if accept_s /= Void then - res.write_string ("Unsupported request content-type, Accept: " + accept_s + "%N") + res.put_string ("Unsupported request content-type, Accept: " + accept_s + "%N") end if uri_s /= Void then - res.write_string ("Unsupported request format from the URI: " + uri_s + "%N") + res.put_string ("Unsupported request format from the URI: " + uri_s + "%N") end end @@ -78,11 +78,11 @@ feature -- Helper s.append_string (c.item) end res.set_status_code ({HTTP_STATUS_CODE}.method_not_allowed) - res.write_header ({HTTP_STATUS_CODE}.method_not_allowed, << + res.put_header ({HTTP_STATUS_CODE}.method_not_allowed, << ["Content-Type", {HTTP_MIME_TYPES}.text_plain], ["Allow", s] >>) - res.write_string ("Unsupported request method, Allow: " + s + "%N") + res.put_string ("Unsupported request method, Allow: " + s + "%N") end note diff --git a/library/server/wsf/router/request_file_system_handler.e b/library/server/wsf/router/request_file_system_handler.e index 9b075cfa..fd973ee6 100644 --- a/library/server/wsf/router/request_file_system_handler.e +++ b/library/server/wsf/router/request_file_system_handler.e @@ -63,8 +63,8 @@ feature -- Execution h.put_content_length (s.count) res.set_status_code ({HTTP_STATUS_CODE}.ok) - res.write_header_text (h.string) - res.write_string (s) + res.put_header_text (h.string) + res.put_string (s) end end @@ -136,9 +136,9 @@ feature -- Execution h.put_content_type_text_html res.set_status_code ({HTTP_STATUS_CODE}.ok) h.put_content_length (s.count) - res.write_header_text (h.string) + res.put_header_text (h.string) if not req.request_method.same_string ({HTTP_REQUEST_METHODS}.method_head) then - res.write_string (s) + res.put_string (s) end res.flush end @@ -174,8 +174,8 @@ feature -- Execution s.append ("Resource %"" + uri + "%" not found%N") res.set_status_code ({HTTP_STATUS_CODE}.not_found) h.put_content_length (s.count) - res.write_header_text (h.string) - res.write_string (s) + res.put_header_text (h.string) + res.put_string (s) res.flush end @@ -190,8 +190,8 @@ feature -- Execution s.append ("Resource %"" + uri + "%": Access denied%N") res.set_status_code ({HTTP_STATUS_CODE}.forbidden) h.put_content_length (s.count) - res.write_header_text (h.string) - res.write_string (s) + res.put_header_text (h.string) + res.put_string (s) res.flush end diff --git a/library/server/wsf/router/routed_service_i.e b/library/server/wsf/router/routed_service_i.e index 56f86913..30f80e97 100644 --- a/library/server/wsf/router/routed_service_i.e +++ b/library/server/wsf/router/routed_service_i.e @@ -57,7 +57,7 @@ feature -- Execution execute_rescue (req: WSF_REQUEST; res: WSF_RESPONSE) do if not res.header_committed then - res.write_header ({HTTP_STATUS_CODE}.internal_server_error, Void) + res.put_header ({HTTP_STATUS_CODE}.internal_server_error, Void) end res.flush end diff --git a/library/server/wsf/src/response/wsf_file_response.e b/library/server/wsf/src/response/wsf_file_response.e index e0854dc6..a556a9ea 100644 --- a/library/server/wsf/src/response/wsf_file_response.e +++ b/library/server/wsf/src/response/wsf_file_response.e @@ -149,17 +149,17 @@ feature -- Basic operations s: detachable READABLE_STRING_8 do res.set_status_code (status_code) - res.write_header_text (header.string) + res.put_header_text (header.string) s := head if s /= Void then - res.write_string (s) + res.put_string (s) end if not answer_head_request_method then send_file_content_to (file_name, res) end s := bottom if s /= Void then - res.write_string (s) + res.put_string (s) end end @@ -224,7 +224,7 @@ feature {NONE} -- Implementation: output f.exhausted loop f.read_stream (4_096) - res.write_string (f.last_string) + res.put_string (f.last_string) end f.close end