From 210fae5000eb715c31de2914aab6c47e8ef7f774 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Sat, 6 Aug 2016 10:04:45 +0200 Subject: [PATCH] First step towards SSL support. --- examples/proxy/proxy.ecf | 2 +- .../wsf_simple_reverse_proxy_handler.e | 4 +-- library/server/wsf_proxy/wsf_proxy-safe.ecf | 25 +++++++++++++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/examples/proxy/proxy.ecf b/examples/proxy/proxy.ecf index e22facd4..31ef951a 100644 --- a/examples/proxy/proxy.ecf +++ b/examples/proxy/proxy.ecf @@ -13,7 +13,7 @@ - + diff --git a/library/server/wsf_proxy/reverse_proxy/wsf_simple_reverse_proxy_handler.e b/library/server/wsf_proxy/reverse_proxy/wsf_simple_reverse_proxy_handler.e index 699063df..ac6753c3 100644 --- a/library/server/wsf_proxy/reverse_proxy/wsf_simple_reverse_proxy_handler.e +++ b/library/server/wsf_proxy/reverse_proxy/wsf_simple_reverse_proxy_handler.e @@ -84,7 +84,6 @@ feature -- Execution execute (request: WSF_REQUEST; response: WSF_RESPONSE) -- Execute reverse proxy request. local - l_socket: NETWORK_STREAM_SOCKET h: HTTP_HEADER l_http_query: STRING l_status_line: STRING @@ -94,8 +93,7 @@ feature -- Execution i: INTEGER l_completed: BOOLEAN do - if attached (create {INET_ADDRESS_FACTORY}).create_from_name (host) as l_peer_address then - create l_socket.make_client_by_address_and_port (l_peer_address, port) + if attached (create {WSF_PROXY_SOCKET_FACTORY}).socket (host, port) as l_socket then l_socket.set_connect_timeout (connect_timeout) -- milliseconds l_socket.set_timeout (timeout) -- seconds diff --git a/library/server/wsf_proxy/wsf_proxy-safe.ecf b/library/server/wsf_proxy/wsf_proxy-safe.ecf index f8a2dffb..f07f10df 100644 --- a/library/server/wsf_proxy/wsf_proxy-safe.ecf +++ b/library/server/wsf_proxy/wsf_proxy-safe.ecf @@ -5,8 +5,29 @@ + + + + + - - + + + ssl + no_ssl + + + + + + + + + + + + + +