From dc25723a35ab70fa28a6e62a75074d0bcb6dd7e5 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 28 Jun 2013 11:32:12 +0200 Subject: [PATCH] Improved Unicode support. --- .../http_client/src/http_client_request_context.e | 10 +++++++--- .../src/spec/libcurl/libcurl_http_client_request.e | 6 +++--- .../src/spec/libcurl/libcurl_http_client_session.e | 4 ++-- .../notification_email/notification_external_mailer.e | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/library/network/http_client/src/http_client_request_context.e b/library/network/http_client/src/http_client_request_context.e index 3d1c69e4..78819831 100644 --- a/library/network/http_client/src/http_client_request_context.e +++ b/library/network/http_client/src/http_client_request_context.e @@ -69,7 +69,7 @@ feature -- Access -- Upload data --| Note: make sure to precise the Content-Type header - upload_filename: detachable READABLE_STRING_8 + upload_filename: detachable IMMUTABLE_STRING_32 -- Upload data read from `upload_filename' --| Note: make sure to precise the Content-Type header @@ -154,11 +154,15 @@ feature -- Element change upload_data := a_data end - set_upload_filename (a_fn: like upload_filename) + set_upload_filename (a_fn: detachable READABLE_STRING_GENERAL) require has_no_upload_filename: a_fn /= Void implies not has_upload_filename do - upload_filename := a_fn + if a_fn = Void then + upload_filename := Void + else + create upload_filename.make_from_string_general (a_fn) + end end set_write_agent (agt: like write_agent) diff --git a/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e b/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e index 87d3d4ee..083ca687 100644 --- a/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e +++ b/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e @@ -61,7 +61,7 @@ feature -- Execution retried: BOOLEAN l_form_data: detachable HASH_TABLE [READABLE_STRING_32, READABLE_STRING_32] l_upload_data: detachable READABLE_STRING_8 - l_upload_filename: detachable READABLE_STRING_8 + l_upload_filename: detachable READABLE_STRING_GENERAL l_headers: like headers do if not retried then @@ -172,7 +172,7 @@ feature -- Execution or request_method.is_case_insensitive_equal ("PUT") end - create l_upload_file.make (l_upload_filename) + create l_upload_file.make_with_name (l_upload_filename) if l_upload_file.exists and then l_upload_file.is_readable then curl_easy.setopt_integer (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_upload, 1) @@ -388,7 +388,7 @@ feature {NONE} -- Implementation end note - copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 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 c7c6a210..d68eb98b 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 @@ -85,7 +85,7 @@ feature -- Basic operation f.close check ctx /= Void then ctx.set_upload_data (Void) - ctx.set_upload_filename (f.name) + ctx.set_upload_filename (f.path.name) end end Result := custom ("PUT", a_path, ctx) @@ -151,7 +151,7 @@ feature {LIBCURL_HTTP_CLIENT_REQUEST} -- Curl implementation ;note - copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/runtime/process/notification_email/notification_external_mailer.e b/library/runtime/process/notification_email/notification_external_mailer.e index 1e88e856..41f106f1 100644 --- a/library/runtime/process/notification_email/notification_external_mailer.e +++ b/library/runtime/process/notification_email/notification_external_mailer.e @@ -113,7 +113,7 @@ feature -- Basic operation f.put_string (a_email.message) f.close create args.make (1) - args.force (f.name) + args.force (f.path.name) end end p := l_factory.process_launcher (executable_path.name, args, Void)