libcurl: Applied a workaround to avoid issue on Win32 (see LIBCURL_HTTP_CLIENT_REQUEST.apply_workaround)
Separated the http_client-safe.ecf and test-safe.ecf Added HTTP_CLIENT_SESSION.set_max_redirects Fixed broken test due to formatting trouble.
This commit is contained in:
@@ -1,12 +1,29 @@
|
||||
note
|
||||
description : "Objects that ..."
|
||||
author : "$Author$"
|
||||
date : "$Date$"
|
||||
revision : "$Revision$"
|
||||
description : "[
|
||||
HTTP_CLIENT_SESSION represent a session
|
||||
and is used to call get, post, .... request
|
||||
with predefined settings such as
|
||||
base_url
|
||||
specific common headers
|
||||
timeout and so on ...
|
||||
]"
|
||||
author: "$Author$"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
HTTP_CLIENT_SESSION
|
||||
|
||||
inherit
|
||||
ANY
|
||||
|
||||
HTTP_CLIENT_CONSTANTS
|
||||
rename
|
||||
auth_type_id as auth_type_id_from_string
|
||||
export
|
||||
{NONE} all
|
||||
end
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_base_url: READABLE_STRING_8)
|
||||
@@ -154,37 +171,36 @@ feature -- Change
|
||||
set_auth_type (s: READABLE_STRING_8)
|
||||
do
|
||||
auth_type := s
|
||||
auth_type_id := http_client_constants.auth_type_id (s)
|
||||
auth_type_id := auth_type_id_from_string (s)
|
||||
end
|
||||
|
||||
set_basic_auth_type
|
||||
do
|
||||
auth_type := "basic"
|
||||
auth_type_id := {HTTP_CLIENT_CONSTANTS}.auth_type_basic
|
||||
auth_type_id := Auth_type_basic
|
||||
end
|
||||
|
||||
set_digest_auth_type
|
||||
do
|
||||
auth_type := "digest"
|
||||
auth_type_id := {HTTP_CLIENT_CONSTANTS}.auth_type_digest
|
||||
auth_type_id := Auth_type_digest
|
||||
end
|
||||
|
||||
set_any_auth_type
|
||||
do
|
||||
auth_type := "any"
|
||||
auth_type_id := {HTTP_CLIENT_CONSTANTS}.auth_type_any
|
||||
auth_type_id := Auth_type_any
|
||||
end
|
||||
|
||||
set_anysafe_auth_type
|
||||
do
|
||||
auth_type := "anysafe"
|
||||
auth_type_id := {HTTP_CLIENT_CONSTANTS}.auth_type_anysafe
|
||||
auth_type_id := Auth_type_anysafe
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
http_client_constants: HTTP_CLIENT_CONSTANTS
|
||||
once
|
||||
create Result
|
||||
set_max_redirects (n: like max_redirects)
|
||||
do
|
||||
max_redirects := n
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -24,6 +24,15 @@ feature {NONE} -- Initialization
|
||||
do
|
||||
make_request (a_url, a_session, ctx)
|
||||
request_method := a_request_method
|
||||
apply_workaround
|
||||
end
|
||||
|
||||
apply_workaround
|
||||
-- Due to issue with Eiffel cURL on Windows 32bits
|
||||
-- we need to do the following workaround
|
||||
once
|
||||
if attached (create {INET_ADDRESS_FACTORY}).create_localhost then
|
||||
end
|
||||
end
|
||||
|
||||
session: LIBCURL_HTTP_CLIENT_SESSION
|
||||
|
||||
Reference in New Issue
Block a user