diff --git a/library/network/http_client/src/spec/libcurl/libcurl_http_client_session.e b/library/network/http_client/src/spec/libcurl/libcurl_http_client_session.e index e54dd360..c7c6a210 100644 --- a/library/network/http_client/src/spec/libcurl/libcurl_http_client_session.e +++ b/library/network/http_client/src/spec/libcurl/libcurl_http_client_session.e @@ -63,7 +63,6 @@ feature -- Basic operation put (a_path: READABLE_STRING_8; a_ctx: detachable HTTP_CLIENT_REQUEST_CONTEXT; data: detachable READABLE_STRING_8): HTTP_CLIENT_RESPONSE local - req: HTTP_CLIENT_REQUEST ctx: detachable HTTP_CLIENT_REQUEST_CONTEXT f: detachable RAW_FILE l_data: detachable READABLE_STRING_8 diff --git a/library/server/wsf/router/filter/wsf_maintenance_filter.e b/library/server/wsf/router/filter/wsf_maintenance_filter.e index c25c77ae..00c63937 100644 --- a/library/server/wsf/router/filter/wsf_maintenance_filter.e +++ b/library/server/wsf/router/filter/wsf_maintenance_filter.e @@ -68,10 +68,6 @@ feature -- Basic operations end end -feature -- Constants - - Date_time_format: STRING = "[0]dd/[0]mm/yyyy [0]hh:[0]mi:[0]ss" - note copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" diff --git a/library/server/wsf/src/request/value/wsf_uploaded_file.e b/library/server/wsf/src/request/value/wsf_uploaded_file.e index f6c5e7c3..98912d5a 100644 --- a/library/server/wsf/src/request/value/wsf_uploaded_file.e +++ b/library/server/wsf/src/request/value/wsf_uploaded_file.e @@ -116,6 +116,41 @@ feature -- Access: Uploaded File feature -- Conversion + append_content_to_string (a_target: STRING) + -- Append the content of the uploaded file to `a_target'. + local + f: RAW_FILE + s: STRING + done: BOOLEAN + retried: BOOLEAN + do + if not retried and attached tmp_name as fn then + create f.make_with_name (fn) + if f.exists then + f.open_read + from + until + done + loop + f.read_stream_thread_aware (1_024) + s := f.last_string + if s.is_empty then + done := True + else + a_target.append (s) + done := f.exhausted or f.end_of_file + end + end + f.close + end + end + rescue + retried := True + retry + end + +feature -- Implementation + safe_filename: STRING local fn: like filename diff --git a/library/server/wsf/src/response/wsf_default_router_response.e b/library/server/wsf/src/response/wsf_default_router_response.e index 23b7ef99..327f97e4 100644 --- a/library/server/wsf/src/response/wsf_default_router_response.e +++ b/library/server/wsf/src/response/wsf_default_router_response.e @@ -24,6 +24,7 @@ feature {NONE} -- Initialization do router := a_router make (req) + set_suggestion_only_method (True) end feature -- Access @@ -36,6 +37,9 @@ feature -- Settings documentation_included: BOOLEAN -- Include self-documentation from `router' in the response? + suggestion_only_method: BOOLEAN + -- Display only suggestion for `req' method ? + feature -- Change set_documentation_included (b: BOOLEAN) @@ -43,6 +47,14 @@ feature -- Change documentation_included := b end + set_suggestion_only_method (b: BOOLEAN) + -- Set `suggestion_only_method' to `b' + do + suggestion_only_method := b + ensure + suggestion_only_method_set: suggestion_only_method = b + end + feature {WSF_RESPONSE} -- Output send_to (res: WSF_RESPONSE) @@ -138,10 +150,14 @@ feature {NONE} -- Implementation not_found_message (req: WSF_REQUEST): WSF_NOT_FOUND_RESPONSE local vis: WSF_ROUTER_AGENT_ITERATOR + l_method: detachable READABLE_STRING_8 do Result := Precursor (req) if documentation_included then create vis + if suggestion_only_method then + l_method := req.request_method + end vis.on_item_actions.extend (agent (i: WSF_ROUTER_ITEM; r: WSF_NOT_FOUND_RESPONSE; m: detachable READABLE_STRING_8) local l_is_hidden: BOOLEAN @@ -174,7 +190,7 @@ feature {NONE} -- Implementation r.add_suggested_text (s, Void) end end - end (?, Result, req.request_method)) + end (?, Result, l_method)) vis.process_router (router) end end diff --git a/library/server/wsf/src/response/wsf_method_not_allowed_response.e b/library/server/wsf/src/response/wsf_method_not_allowed_response.e index ea1e0d70..4b33868a 100644 --- a/library/server/wsf/src/response/wsf_method_not_allowed_response.e +++ b/library/server/wsf/src/response/wsf_method_not_allowed_response.e @@ -136,11 +136,11 @@ feature {WSF_RESPONSE} -- Output s.append ( "[