Improved Unicode support.
This commit is contained in:
@@ -69,7 +69,7 @@ feature -- Access
|
|||||||
-- Upload data
|
-- Upload data
|
||||||
--| Note: make sure to precise the Content-Type header
|
--| 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'
|
-- Upload data read from `upload_filename'
|
||||||
--| Note: make sure to precise the Content-Type header
|
--| Note: make sure to precise the Content-Type header
|
||||||
|
|
||||||
@@ -154,11 +154,15 @@ feature -- Element change
|
|||||||
upload_data := a_data
|
upload_data := a_data
|
||||||
end
|
end
|
||||||
|
|
||||||
set_upload_filename (a_fn: like upload_filename)
|
set_upload_filename (a_fn: detachable READABLE_STRING_GENERAL)
|
||||||
require
|
require
|
||||||
has_no_upload_filename: a_fn /= Void implies not has_upload_filename
|
has_no_upload_filename: a_fn /= Void implies not has_upload_filename
|
||||||
do
|
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
|
end
|
||||||
|
|
||||||
set_write_agent (agt: like write_agent)
|
set_write_agent (agt: like write_agent)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ feature -- Execution
|
|||||||
retried: BOOLEAN
|
retried: BOOLEAN
|
||||||
l_form_data: detachable HASH_TABLE [READABLE_STRING_32, READABLE_STRING_32]
|
l_form_data: detachable HASH_TABLE [READABLE_STRING_32, READABLE_STRING_32]
|
||||||
l_upload_data: detachable READABLE_STRING_8
|
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
|
l_headers: like headers
|
||||||
do
|
do
|
||||||
if not retried then
|
if not retried then
|
||||||
@@ -172,7 +172,7 @@ feature -- Execution
|
|||||||
or request_method.is_case_insensitive_equal ("PUT")
|
or request_method.is_case_insensitive_equal ("PUT")
|
||||||
end
|
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
|
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)
|
curl_easy.setopt_integer (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_upload, 1)
|
||||||
|
|
||||||
@@ -388,7 +388,7 @@ feature {NONE} -- Implementation
|
|||||||
end
|
end
|
||||||
|
|
||||||
note
|
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)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ feature -- Basic operation
|
|||||||
f.close
|
f.close
|
||||||
check ctx /= Void then
|
check ctx /= Void then
|
||||||
ctx.set_upload_data (Void)
|
ctx.set_upload_data (Void)
|
||||||
ctx.set_upload_filename (f.name)
|
ctx.set_upload_filename (f.path.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Result := custom ("PUT", a_path, ctx)
|
Result := custom ("PUT", a_path, ctx)
|
||||||
@@ -151,7 +151,7 @@ feature {LIBCURL_HTTP_CLIENT_REQUEST} -- Curl implementation
|
|||||||
|
|
||||||
|
|
||||||
;note
|
;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)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ feature -- Basic operation
|
|||||||
f.put_string (a_email.message)
|
f.put_string (a_email.message)
|
||||||
f.close
|
f.close
|
||||||
create args.make (1)
|
create args.make (1)
|
||||||
args.force (f.name)
|
args.force (f.path.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
p := l_factory.process_launcher (executable_path.name, args, Void)
|
p := l_factory.process_launcher (executable_path.name, args, Void)
|
||||||
|
|||||||
Reference in New Issue
Block a user