Added support for chunked transfer-encoding response.
Implemented correctly the redirection support for NET_HTTP_CLIENT... Added the possibility to use HTTP/1.0 . Splitted the manual tests that were using during development. First step to redesign and clean the new code.
This commit is contained in:
@@ -61,6 +61,7 @@ feature -- Execution
|
||||
l_upload_data: detachable READABLE_STRING_8
|
||||
l_upload_filename: detachable READABLE_STRING_GENERAL
|
||||
l_headers: like headers
|
||||
l_is_http_1_0: BOOLEAN
|
||||
do
|
||||
if not retried then
|
||||
curl := session.curl
|
||||
@@ -70,6 +71,10 @@ feature -- Execution
|
||||
|
||||
ctx := context
|
||||
|
||||
if ctx /= Void then
|
||||
l_is_http_1_0 := attached ctx.http_version as l_http_version and then l_http_version.same_string ("HTTP/1.0")
|
||||
end
|
||||
|
||||
--| Configure cURL session
|
||||
initialize_curl_session (ctx, curl, curl_easy, curl_handle)
|
||||
|
||||
@@ -84,7 +89,11 @@ feature -- Execution
|
||||
io.put_new_line
|
||||
end
|
||||
curl_easy.setopt_string (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_url, l_url)
|
||||
|
||||
if l_is_http_1_0 then
|
||||
curl_easy.setopt_integer (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_http_version, {CURL_OPT_CONSTANTS}.curl_http_version_1_0)
|
||||
else
|
||||
curl_easy.setopt_integer (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_http_version, {CURL_OPT_CONSTANTS}.curl_http_version_none)
|
||||
end
|
||||
l_headers := headers
|
||||
|
||||
-- Context
|
||||
|
||||
Reference in New Issue
Block a user