From a498a167edc975ebb12a261b19f8c3951e9ffcce Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 11 Oct 2016 16:20:04 +0200 Subject: [PATCH 01/30] Updated desktop application example for scoop concurrency mode. --- examples/desktop_app/desktop_app.ecf | 10 +++---- examples/desktop_app/src/desktop_app.e | 29 ++++++++++++------- .../src/service/embedded_web_execution.e | 5 ++-- .../src/service/embedded_web_service.e | 17 +++++++++-- 4 files changed, 39 insertions(+), 22 deletions(-) diff --git a/examples/desktop_app/desktop_app.ecf b/examples/desktop_app/desktop_app.ecf index 6ba18b3f..2f0752c7 100644 --- a/examples/desktop_app/desktop_app.ecf +++ b/examples/desktop_app/desktop_app.ecf @@ -1,13 +1,13 @@ - + Vision2+web browser widget+embedded web service This example demonstrates how to build a vision2 desktop application that embed a web browser accessing the service of an embedded web service. - - + @@ -18,9 +18,9 @@ - /EIFGENs$ - /CVS$ /.svn$ + /CVS$ + /EIFGENs$ diff --git a/examples/desktop_app/src/desktop_app.e b/examples/desktop_app/src/desktop_app.e index a48779f0..4e506670 100644 --- a/examples/desktop_app/src/desktop_app.e +++ b/examples/desktop_app/src/desktop_app.e @@ -24,20 +24,25 @@ feature {NONE} -- Initialization -- then launch the application. local l_win: like main_window - l_embedded_service: APP_EMBEDDED_WEB_SERVICE + l_embedded_service: separate APP_EMBEDDED_WEB_SERVICE do default_create create l_win.make main_window := l_win l_win.show create l_embedded_service.make - l_embedded_service.set_port_number (0) -- Use first available port number - - l_embedded_service.on_launched_actions.force (agent on_web_service_launched (l_win, l_embedded_service)) - l_embedded_service.launch + setup_and_launch_web_service (l_embedded_service) launch end + + setup_and_launch_web_service (a_web_service: separate APP_EMBEDDED_WEB_SERVICE) + do + a_web_service.set_port_number (0) -- Use first available port number + a_web_service.set_on_launched_action (agent on_web_service_launched (a_web_service)) + a_web_service.launch + end + on_quit do if attached main_window as win then @@ -45,13 +50,15 @@ feature {NONE} -- Initialization end end - on_web_service_launched (a_win: attached like main_window; s: APP_EMBEDDED_WEB_SERVICE) + on_web_service_launched (a_web_service: separate APP_EMBEDDED_WEB_SERVICE) do - add_idle_action_kamikaze (agent wait_for_termination (s, Void)) - add_idle_action_kamikaze (agent a_win.open_link) + if attached main_window as win then + add_idle_action_kamikaze (agent wait_for_termination (a_web_service, Void)) + add_idle_action_kamikaze (agent win.open_link) + end end - wait_for_termination (s: APP_EMBEDDED_WEB_SERVICE; a_timeout: detachable EV_TIMEOUT) + wait_for_termination (a_web_service: separate APP_EMBEDDED_WEB_SERVICE; a_timeout: detachable EV_TIMEOUT) local t: detachable EV_TIMEOUT do @@ -60,7 +67,7 @@ feature {NONE} -- Initialization t.set_interval (0) end if - attached s.observer as obs and then + attached a_web_service.observer as obs and then observer_has_terminaded (obs) then if t /= Void then @@ -70,7 +77,7 @@ feature {NONE} -- Initialization else if t = Void then create t - t.actions.extend (agent wait_for_termination (s, t)) + t.actions.extend (agent wait_for_termination (a_web_service, t)) else t.set_interval (1_000) end diff --git a/examples/desktop_app/src/service/embedded_web_execution.e b/examples/desktop_app/src/service/embedded_web_execution.e index 9ece6bdc..3bb0c667 100644 --- a/examples/desktop_app/src/service/embedded_web_execution.e +++ b/examples/desktop_app/src/service/embedded_web_execution.e @@ -17,13 +17,12 @@ inherit feature {NONE} -- Execution - execute_embedded + execute_embedded -- Execute the request -- See `request.input' for input stream -- `request.meta_variables' for the CGI meta variable -- and `response' for output buffer local - filter: WSF_AGENT_FILTER m: WSF_PAGE_RESPONSE do if local_connection_restriction_enabled then @@ -41,7 +40,7 @@ feature {NONE} -- Execution execute end end - + execute deferred end diff --git a/examples/desktop_app/src/service/embedded_web_service.e b/examples/desktop_app/src/service/embedded_web_service.e index 7b3adc88..b690d574 100644 --- a/examples/desktop_app/src/service/embedded_web_service.e +++ b/examples/desktop_app/src/service/embedded_web_service.e @@ -16,7 +16,6 @@ feature -- Initialization make do - create on_launched_actions end feature -- Execution @@ -40,11 +39,23 @@ feature -- Execution on_launched (conn: WGI_STANDALONE_CONNECTOR [G]) do set_port_number (conn.port) - on_launched_actions.call (Void) + if attached on_launched_action as act then + call_action (act) + end + end + + call_action (act: attached like on_launched_action) + do + act.call (Void) end feature -- Access - on_launched_actions: ACTION_SEQUENCE [TUPLE] + on_launched_action: detachable separate PROCEDURE [ANY, TUPLE] + + set_on_launched_action (act: like on_launched_action) + do + on_launched_action := act + end end From 2cfe00e61ba3854fb6ebd2ed060b5aa887ee9469 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 11 Oct 2016 17:30:50 +0200 Subject: [PATCH 02/30] Updated desktop_app example with embedded standalone web server. --- examples/desktop_app/src/service/embedded_web_execution.e | 5 ++++- examples/desktop_app/src/service/embedded_web_service.e | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/desktop_app/src/service/embedded_web_execution.e b/examples/desktop_app/src/service/embedded_web_execution.e index 3bb0c667..6c63fc7f 100644 --- a/examples/desktop_app/src/service/embedded_web_execution.e +++ b/examples/desktop_app/src/service/embedded_web_execution.e @@ -28,7 +28,10 @@ feature {NONE} -- Execution if local_connection_restriction_enabled then if attached request.remote_addr as l_remote_addr and then - l_remote_addr.is_case_insensitive_equal_general ("127.0.0.1") + ( + l_remote_addr.is_case_insensitive_equal_general ("127.0.0.1") + or else l_remote_addr.is_case_insensitive_equal_general ("localhost") + ) then execute else diff --git a/examples/desktop_app/src/service/embedded_web_service.e b/examples/desktop_app/src/service/embedded_web_service.e index b690d574..15c60fbb 100644 --- a/examples/desktop_app/src/service/embedded_web_service.e +++ b/examples/desktop_app/src/service/embedded_web_service.e @@ -26,7 +26,6 @@ feature -- Execution opts: WSF_SERVICE_LAUNCHER_OPTIONS do create opts.default_create - opts.set_verbose (True) opts.set_option ("port", port_number) create launcher.make (opts) observer := launcher.connector.observer From 1170417e5476875dcb3a8671e3a92a095b14ff50 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 11 Oct 2016 17:34:07 +0200 Subject: [PATCH 03/30] Fixed regression with persistent connection, be sure to keep the `remote_info` data for all successive requests within a same persistent connection. --- .../lib/httpd/httpd_request_handler_i.e | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_i.e b/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_i.e index 4fd01c02..59eac4e4 100644 --- a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_i.e +++ b/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_i.e @@ -31,7 +31,7 @@ feature {NONE} -- Initialization reset do - reset_request + reset_request (False) reset_error if attached internal_client_socket as l_sock then @@ -40,10 +40,18 @@ feature {NONE} -- Initialization internal_client_socket := Void end - reset_request + reset_request (a_is_reusing_connection: BOOLEAN) + -- Reset the request, and `a_is_reusing_connection' says if the peristent connection is + -- still alive. do + if a_is_reusing_connection then + -- Keep `remote_info' as it stays the same for the successive + -- persistent connections. + else + remote_info := Void + end + version := Void - remote_info := Void -- FIXME: optimize to just wipe_out if needed create method.make_empty @@ -247,7 +255,7 @@ feature -- Execution or not is_next_persistent_connection_supported -- related to `max_keep_alive_requests' or not is_persistent_connection_requested or has_error or l_socket.is_closed or not l_socket.is_open_read - reset_request + reset_request (not l_exit) end if l_exit and has_error and not l_socket.is_closed then l_socket.close @@ -261,6 +269,7 @@ feature -- Execution is_connected: is_connected reuse_connection_when_possible: a_is_reusing_connection implies is_persistent_connection_supported no_error: not has_error + remote_info_set: remote_info /= Void local l_socket: like client_socket do From ed959042d785643c291db7f1f0fe77b7735ac04e Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 11:12:37 +0200 Subject: [PATCH 04/30] Fixed issue with input using "Transfer-Encoding: chunked". --- .../stream/wgi_chunked_input_stream.e | 55 +++++++++++++++---- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e b/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e index 12d3fc00..dd903650 100644 --- a/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e +++ b/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e @@ -35,6 +35,9 @@ feature -- Input read_character -- Read the next character in input stream. -- Make the result available in `last_character' + local + d: like last_chunk_data + l_index_in_chunk: INTEGER do index := index + 1 if index > chunk_upper then @@ -45,10 +48,24 @@ feature -- Input read_trailer_and_crlf last_character := '%U' else - last_character := last_chunk_data.item (index) + l_index_in_chunk := chunk_index (index) + d := last_chunk_data + if d.valid_index (l_index_in_chunk) then + last_character := d [l_index_in_chunk] + else + check has_character: False end + last_character := '%U' + end end else - last_character := last_chunk_data.item (index) + l_index_in_chunk := chunk_index (index) + d := last_chunk_data + if d.valid_index (l_index_in_chunk) then + last_character := d [l_index_in_chunk] + else + check has_character: False end + last_character := '%U' + end end end @@ -77,13 +94,13 @@ feature -- Input i - index + 1 = nb or last_chunk_size = 0 loop if i + nb - 1 <= chunk_upper then - last_string.append (last_chunk_data.substring (i - chunk_lower + 1, i - chunk_lower + 1 + nb - 1)) + last_string.append (last_chunk_data.substring (chunk_index (i), chunk_index (i) + nb - 1)) i := i + nb - 1 else -- Need to read new chunk -- first get all available data from current chunk - if i <= chunk_upper then - last_string.append (last_chunk_data.substring (i - chunk_lower + 1, chunk_upper - chunk_lower + 1)) + if i > chunk_upper then + last_string.append (last_chunk_data.substring (i - chunk_lower + 1, chunk_index (chunk_upper))) i := chunk_upper end -- then continue @@ -166,9 +183,25 @@ feature -- Status report Result := last_trailer /= Void end -feature {NONE} -- Parser +feature {NONE} -- Access: chunk + + chunk_index (a_index: INTEGER): INTEGER + -- Index in `last_chunk_data' for global input index `a_index'. + do + Result := a_index - chunk_lower + 1 + end + + index: INTEGER + -- Global input index. + + chunk_lower: INTEGER + -- Lower global index for `last_chunk_data'. + + chunk_upper: INTEGER + -- Upper global index for `last_chunk_data'. + +feature {NONE} -- Chunk parsing - index, chunk_lower, chunk_upper: INTEGER tmp_hex_chunk_size: STRING_8 read_chunk_block @@ -190,8 +223,10 @@ feature {NONE} -- Parser check last_chunk_data.count = last_chunk_size end l_input := input + check not l_input.end_of_input end l_input.read_character check l_input.last_character = '%R' end + check not l_input.end_of_input end l_input.read_character check l_input.last_character = '%N' end end @@ -214,8 +249,8 @@ feature {NONE} -- Parser l_input.read_string (last_chunk_size) last_chunk_data := l_input.last_string ensure - last_chunk_attached: attached last_chunk_data as el_last_chunk - last_chunk_size_ok: el_last_chunk.count = last_chunk_size + last_chunk_attached: last_chunk_data /= Void + last_chunk_size_ok: last_chunk_data.count = last_chunk_size end read_chunk_size @@ -350,7 +385,7 @@ feature {NONE} -- Implementation -- Input Stream ;note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software From 29590b1c0d5ec7945f90869970405382efec45fa Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 11:19:23 +0200 Subject: [PATCH 05/30] Fixed potential issue related to PATH_INFO, and `percent_encoded_path_info` computing , when script name is in different path. --- library/server/wsf/src/wsf_request.e | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/library/server/wsf/src/wsf_request.e b/library/server/wsf/src/wsf_request.e index 00708aae..10d8dfca 100644 --- a/library/server/wsf/src/wsf_request.e +++ b/library/server/wsf/src/wsf_request.e @@ -288,7 +288,7 @@ feature -- Access: Input end end if raw_input_data_recorded then - set_raw_input_data (buf.substring (buf_initial_size + 1, buf.count)) + set_raw_input_data (buf.substring (buf_initial_size + 1, buf.count)) -- Only the input data! And differente reference. end end @@ -833,6 +833,7 @@ feature -- Access: CGI meta parameters - 1.1 local l_result: like internal_percent_encoded_path_info r: READABLE_STRING_8 + pi: READABLE_STRING_32 i,m,n,spos: INTEGER do l_result := internal_percent_encoded_path_info @@ -844,11 +845,23 @@ feature -- Access: CGI meta parameters - 1.1 else l_result := r.string end - if attached script_name as s then + pi := path_info + i := 0 + if pi.is_valid_as_string_8 then + i := l_result.substring_index (pi.to_string_8, 1) + if i > 0 then + -- Path info is included in REQUEST_URI + -- so let's get the percent encoded path info from request uri. + l_result := l_result.substring (i, l_result.count) + end + end + --| here "i = 0" means request_uri does not start with `path_info', + --| thus let's compute it from `script_name'. + if i = 0 and attached script_name as s then if l_result.starts_with (s) then l_result := l_result.substring (s.count + 1, l_result.count) else - --| Handle Rewrite url engine, to have clean path + --| Handle Rewrite url engine, to have clean path from i := 1 m := l_result.count @@ -2083,7 +2096,7 @@ invariant wgi_request.content_type /= Void implies content_type /= Void note - copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" + copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software From 57b1691243858108b84c4692a2587bb0159c49b2 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 11:19:54 +0200 Subject: [PATCH 06/30] Added support for debug.ini to debug example. --- examples/debug/src/ewf_debug_server.e | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/debug/src/ewf_debug_server.e b/examples/debug/src/ewf_debug_server.e index 17f6f954..a6d845a5 100644 --- a/examples/debug/src/ewf_debug_server.e +++ b/examples/debug/src/ewf_debug_server.e @@ -28,6 +28,7 @@ feature {NONE} -- Initialization -- set_service_option ("verbose", True) set_service_option ("port", 9090) -- set_service_option ("base", "/www-debug/debug_service.fcgi/") + import_service_options (create {WSF_SERVICE_LAUNCHER_OPTIONS_FROM_INI}.make_from_file ("debug.ini")) end -- execute (req: WSF_REQUEST; res: WSF_RESPONSE) From ef704790a8d05cf7b1be57e2d76d2a9cc7bdc74c Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 11:21:27 +0200 Subject: [PATCH 07/30] Fixed the "wsf_tests" autocase suite, which was wrong for cookies, and other minor changes. --- .../server/wsf/tests/server/test_execution.e | 2 +- .../server/wsf/tests/server/test_settings.e | 2 +- .../tests/src/test_wsf_request_script_url.e | 14 +++++++++++- .../tests/src/test_wsf_response_test_suite.e | 22 +++++++++---------- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/library/server/wsf/tests/server/test_execution.e b/library/server/wsf/tests/server/test_execution.e index db7d0179..21879a8a 100644 --- a/library/server/wsf/tests/server/test_execution.e +++ b/library/server/wsf/tests/server/test_execution.e @@ -51,7 +51,7 @@ feature -- Helper if b = Void then b := "" end - Result := "/" + b + a_query_url + Result := b + a_query_url end end diff --git a/library/server/wsf/tests/server/test_settings.e b/library/server/wsf/tests/server/test_settings.e index b30ee4c3..29e8f5b5 100644 --- a/library/server/wsf/tests/server/test_settings.e +++ b/library/server/wsf/tests/server/test_settings.e @@ -11,6 +11,6 @@ feature -- Access port_number: INTEGER = 9091 - base_url: STRING = "" --"/test/" + base_url: STRING = "/test/" end diff --git a/library/server/wsf/tests/src/test_wsf_request_script_url.e b/library/server/wsf/tests/src/test_wsf_request_script_url.e index 5a97ca86..da0e07e7 100644 --- a/library/server/wsf/tests/src/test_wsf_request_script_url.e +++ b/library/server/wsf/tests/src/test_wsf_request_script_url.e @@ -32,7 +32,7 @@ feature -- Execution feature -- Tests - test_script_url + test_script_url_1 local req: WSF_REQUEST s: READABLE_STRING_8 @@ -48,7 +48,13 @@ feature -- Tests ) s := req.script_url ("/new/path/") assert ("script_url (/new/path/) = %""+s+"%" but should be %"/foo/bar/new/path/%"", s.same_string ("/foo/bar/new/path/")) + end + test_script_url_2 + local + req: WSF_REQUEST + s: READABLE_STRING_8 + do --| Case #2 req := new_request (<< ["REQUEST_METHOD", "GET"], @@ -60,7 +66,13 @@ feature -- Tests ) s := req.script_url ("/new/path/") assert ("script_url (/new/path/) = %""+s+"%" but should be %"/foo/bar/new/path/%"", s.same_string ("/foo/bar/new/path/")) + end + test_script_url_3 + local + req: WSF_REQUEST + s: READABLE_STRING_8 + do --| Case #3 req := new_request (<< ["REQUEST_METHOD", "GET"], diff --git a/library/server/wsf/tests/src/test_wsf_response_test_suite.e b/library/server/wsf/tests/src/test_wsf_response_test_suite.e index 968ca0b2..b5412d03 100644 --- a/library/server/wsf/tests/src/test_wsf_response_test_suite.e +++ b/library/server/wsf/tests/src/test_wsf_response_test_suite.e @@ -44,17 +44,17 @@ feature -- Test Cases l_cookie.set_path ("/") l_cookie.set_secure (True) l_cookie.set_http_only (True) - assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly")) + assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly")) w_res.put_header_text (l_header.string) w_res.add_cookie (l_cookie) w_res.set_status_code ({HTTP_STATUS_CODE}.ok) w_res.put_string ("Test") - assert ("Expected", l_res.output.same_string("200 %R%NContent-Type: text/html%R%NSet-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly%R%N%R%NTest") ) + assert ("Expected", l_res.output.same_string("200 %R%NContent-Type: text/html%R%NSet-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly%R%N%R%NTest") ) end - test_add_multiple_cookiewith_similar_cookie_name + test_add_multiple_cookies_with_similar_cookie_name local w_res: WSF_RESPONSE l_cookie: WSF_COOKIE @@ -73,7 +73,7 @@ feature -- Test Cases l_cookie.set_path ("/") l_cookie.set_secure (True) l_cookie.set_http_only (True) - assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly")) + assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly")) w_res.put_header_text (l_header.string) w_res.add_cookie (l_cookie) @@ -84,16 +84,16 @@ feature -- Test Cases l_cookie.set_path ("/") l_cookie.set_secure (True) l_cookie.set_http_only (True) - assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=newUser; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly")) + assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=newUser; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly")) w_res.add_cookie (l_cookie) -- Ignored w_res.set_status_code ({HTTP_STATUS_CODE}.ok) w_res.put_string ("Test") - assert ("Expected", l_res.output.same_string("200 %R%NContent-Type: text/html%R%NSet-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly%R%N%R%NTest") ) + assert ("Expected", l_res.output.same_string("200 %R%NContent-Type: text/html%R%NSet-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly%R%N%R%NTest") ) end - test_add_multiple_cookie_with_similar_cookie_name_2 + test_add_multiple_cookies_with_similar_cookie_name_2 local w_res: WSF_RESPONSE l_cookie: WSF_COOKIE @@ -113,7 +113,7 @@ feature -- Test Cases l_cookie.set_path ("/") l_cookie.set_secure (True) l_cookie.set_http_only (True) - assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly")) + assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly")) w_res.add_cookie (l_cookie) @@ -123,7 +123,7 @@ feature -- Test Cases l_cookie.set_path ("/") l_cookie.set_secure (True) l_cookie.set_http_only (True) - assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=newUser; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly")) + assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: user_id=newUser; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly")) w_res.add_cookie (l_cookie) -- Ignored @@ -134,11 +134,11 @@ feature -- Test Cases l_cookie.set_path ("/") l_cookie.set_secure (True) l_cookie.set_http_only (True) - assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: ewf_sessionid=test; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly")) + assert("Expected", l_cookie.header_line.same_string ("Set-Cookie: ewf_sessionid=test; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly")) w_res.add_cookie (l_cookie) w_res.set_status_code ({HTTP_STATUS_CODE}.ok) w_res.put_string ("Test") - assert ("Expected", l_res.output.same_string("200 %R%NContent-Type: text/html%R%NSet-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly%R%NSet-Cookie: ewf_sessionid=test; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Max-Age=-1; Secure; HttpOnly%R%N%R%NTest") ) + assert ("Expected", l_res.output.same_string("200 %R%NContent-Type: text/html%R%NSet-Cookie: user_id=u12345; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly%R%NSet-Cookie: ewf_sessionid=test; Domain=www.example.com; Path=/; Expires=Sat, 18 Apr 2015 21:22:05 GMT; Secure; HttpOnly%R%N%R%NTest") ) end end From 9e92b8c0fa3f05a6657fecb0896bbb816909ecb6 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 11:21:42 +0200 Subject: [PATCH 08/30] Fixed typo in restbuck name. --- tests/run_CI_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run_CI_tests.py b/tests/run_CI_tests.py index 905cce7a..363b6dd1 100644 --- a/tests/run_CI_tests.py +++ b/tests/run_CI_tests.py @@ -85,7 +85,7 @@ def runTestForProject(where): # compile the restbucks print "# Compiling restbucks example" - cmd = "ecb -config %s -target restbucks -batch -c_compile -project_path . " % (os.path.join ("examples", "restbucks", "restbucks-safe.ecf")) + cmd = "ecb -config %s -target restbucks -batch -c_compile -project_path . " % (os.path.join ("examples", "restbucksCRUD", "restbucks-safe.ecf")) res = eval_cmd(cmd) sleep(1) From d28f7948289259e5d42c897619378f7b4d3a08f2 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 16:49:08 +0200 Subject: [PATCH 09/30] Implemented chunked Transfer-Encoding in net_http_client. Implemented support for buffer_size and chunk_size for net_http_client. --- .../http_client/src/http_client_request.e | 23 +- .../http_client/src/http_client_session.e | 20 +- .../src/spec/net/net_http_client_request.e | 213 +++++++++++++++--- .../http_client/tests/test_net_with_web.e | 5 + .../http_client/tests/test_with_web_i.e | 32 +++ 5 files changed, 259 insertions(+), 34 deletions(-) diff --git a/library/network/http_client/src/http_client_request.e b/library/network/http_client/src/http_client_request.e index b11d1f15..6fcd7307 100644 --- a/library/network/http_client/src/http_client_request.e +++ b/library/network/http_client/src/http_client_request.e @@ -164,11 +164,24 @@ feature -- Settings Result := session.ignore_content_length end - buffer_size: NATURAL - -- Set the buffer size for request. This option will - -- only be set if buffer_size is positive + buffer_size: INTEGER + -- Buffer size for request, + -- initialized from the session buffer_size value, or default 2_048. do - Result := session.buffer_size + Result := session.buffer_size.to_integer_32 + if Result <= 0 then + Result := 2_048 + end + end + + chunk_size: INTEGER + -- Chunk size for request, when "Transfer-Encoding: chunked" + -- initialized from the session buffer_size value, or default 2_048. + do + Result := session.chunk_size.to_integer_32 + if Result <= 0 then + Result := 2_048 + end end default_response_charset: detachable READABLE_STRING_8 @@ -249,7 +262,7 @@ feature {NONE} -- Utilities: encoding end note - copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2016, 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/http_client_session.e b/library/network/http_client/src/http_client_session.e index b5bf34c5..f5342695 100644 --- a/library/network/http_client/src/http_client_session.e +++ b/library/network/http_client/src/http_client_session.e @@ -243,9 +243,13 @@ feature -- Settings ignore_content_length: BOOLEAN -- Does this session ignore Content-Size headers? - buffer_size: NATURAL + buffer_size: NATURAL assign set_buffer_size -- Set the buffer size for request. This option will - -- only be set if buffer_size is positive + -- only be set if buffer_size > 0. + + chunk_size: NATURAL assign set_chunk_size + -- Set the chunk size for request, when "Transfer-Encoding: chunked". + -- This option will only be set if chunk_size > 0. default_response_charset: detachable READABLE_STRING_8 -- Default encoding of responses. Used if no charset is provided by the host. @@ -405,8 +409,18 @@ feature -- Element change end end + set_buffer_size (a_size: like buffer_size) + do + buffer_size := a_size + end + + set_chunk_size (a_size: like chunk_size) + do + chunk_size := a_size + end + note - copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2016, 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/net/net_http_client_request.e b/library/network/http_client/src/spec/net/net_http_client_request.e index 61cc4ae7..1014c929 100644 --- a/library/network/http_client/src/spec/net/net_http_client_request.e +++ b/library/network/http_client/src/spec/net/net_http_client_request.e @@ -100,6 +100,7 @@ feature -- Access l_boundary: READABLE_STRING_8 l_is_http_1_0_request: BOOLEAN l_is_keep_alive: BOOLEAN + l_is_chunked_transfer_encoding: BOOLEAN retried: BOOLEAN do if not retried then @@ -179,6 +180,8 @@ feature -- Access end -- handle sending data + l_is_chunked_transfer_encoding := attached headers.item ("Transfer-Encoding") as l_transfer_encoding and then l_transfer_encoding.same_string ("chunked") + if ctx /= Void then if ctx.has_upload_filename then l_upload_filename := ctx.upload_filename @@ -195,14 +198,21 @@ feature -- Access headers.extend ("application/x-www-form-urlencoded", "Content-Type") l_upload_data := ctx.form_parameters_to_url_encoded_string headers.force (l_upload_data.count.out, "Content-Length") - - else + if l_is_chunked_transfer_encoding then + -- Discard chunked transfer encoding + headers.remove ("Transfer-Encoding") + l_is_chunked_transfer_encoding := False + end + elseif l_form_data /= Void then -- create form using multipart/form-data encoding - l_boundary := new_mime_boundary + l_boundary := new_mime_boundary (l_form_data) headers.extend ("multipart/form-data; boundary=" + l_boundary, "Content-Type") - if l_form_data /= Void then - l_upload_data := form_date_and_uploaded_files_to_mime_string (l_form_data, l_upload_filename, l_boundary) - headers.extend (l_upload_data.count.out, "Content-Length") + l_upload_data := form_date_and_uploaded_files_to_mime_string (l_form_data, l_upload_filename, l_boundary) + headers.extend (l_upload_data.count.out, "Content-Length") + if l_is_chunked_transfer_encoding then + -- Discard chunked transfer encoding + headers.remove ("Transfer-Encoding") + l_is_chunked_transfer_encoding := False end end elseif l_upload_data /= Void then @@ -210,12 +220,16 @@ feature -- Access if not headers.has ("Content-Type") then headers.extend ("application/x-www-form-urlencoded", "Content-Type") end - headers.extend (l_upload_data.count.out, "Content-Length") + if not l_is_chunked_transfer_encoding then + headers.extend (l_upload_data.count.out, "Content-Length") + end elseif l_upload_filename /= Void then check ctx.has_upload_filename end create l_upload_file.make_with_name (l_upload_filename) if l_upload_file.exists and then l_upload_file.readable then - headers.extend (l_upload_file.count.out, "Content-Length") + if not l_is_chunked_transfer_encoding then + headers.extend (l_upload_file.count.out, "Content-Length") + end end check l_upload_file /= Void end end @@ -289,12 +303,7 @@ feature -- Access --| End of client header. s.append (Http_end_of_header_line) - if l_upload_data /= Void then - s.append (l_upload_data) - s.append (http_end_of_header_line) - end - - --| Note that any remaining file to upload will be done directly via the socket + --| Note that any remaining data or file to upload will be done directly via the socket --| to optimize memory usage @@ -315,9 +324,20 @@ feature -- Access end l_socket.put_string (s) --| Send remaining payload data, if needed. + if l_upload_data /= Void then + if l_is_chunked_transfer_encoding then + put_string_using_chunked_transfer_encoding (l_upload_data, chunk_size, l_socket) + else + l_socket.put_string (l_upload_data) + end + end if l_upload_file /= Void then - -- i.e: not yet processed - append_file_content_to_socket (l_upload_file, l_upload_file.count, l_socket) + if l_is_chunked_transfer_encoding then + -- i.e: not yet processed + append_file_content_to_socket_using_chunked_transfer_encoding (l_upload_file, l_upload_file.count, chunk_size, l_socket) + else + append_file_content_to_socket (l_upload_file, l_upload_file.count, l_socket) + end end --|-------------------------|-- @@ -498,8 +518,85 @@ feature {NONE} -- Helpers Result := utf.utf_32_string_to_utf_8_string_8 (s) end - append_file_content_to_socket (a_file: FILE; a_len: INTEGER; a_output: NETWORK_STREAM_SOCKET) - -- Append `a_file' content to `a_output'. + put_string_using_chunked_transfer_encoding (a_string: READABLE_STRING_8; a_chunk_size: INTEGER; a_output: NETWORK_STREAM_SOCKET) + local + i,n: INTEGER + do + from + i := 1 + n := a_string.count + until + i > n + loop + put_chunk (a_string.substring (i, i + a_chunk_size), Void, a_output) + i := i + a_chunk_size + end + put_chunk_end (Void, Void, a_output) + end + + put_chunk (a_content: READABLE_STRING_8; a_ext: detachable READABLE_STRING_8; a_output: NETWORK_STREAM_SOCKET) + -- Write chunk non empty `a_content' to `a_output' + -- with optional extension `a_ext': chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] ) + -- Note: that header "Transfer-Encoding: chunked" is required. + require + a_content_not_empty: a_content /= Void and then not a_content.is_empty + valid_chunk_extension: (a_ext /= Void and then not a_ext.is_empty) implies + ( a_ext.starts_with (";") and not a_ext.has ('%N') and not not a_ext.has ('%R') ) + local + l_chunk_size_line: STRING_8 + i: INTEGER + do + --| Remove all left '0' + l_chunk_size_line := a_content.count.to_hex_string + from + i := 1 + until + l_chunk_size_line[i] /= '0' + loop + i := i + 1 + end + if i > 1 then + l_chunk_size_line := l_chunk_size_line.substring (i, l_chunk_size_line.count) + end + + if a_ext /= Void then + l_chunk_size_line.append (a_ext) + end + l_chunk_size_line.append (crlf) + + a_output.put_string (l_chunk_size_line) + a_output.put_string (a_content) + a_output.put_string (crlf) + end + + put_chunk_end (a_ext: detachable READABLE_STRING_8; a_trailer: detachable READABLE_STRING_8; a_output: NETWORK_STREAM_SOCKET) + -- Put end of chunked content, + -- with optional extension `a_ext': chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] ) + -- and with optional trailer `a_trailer' : trailer= *(entity-header CRLF) + local + l_chunk_size_line: STRING_8 + do + -- Chunk end + create l_chunk_size_line.make (1) + l_chunk_size_line.append_integer (0) + + if a_ext /= Void then + l_chunk_size_line.append (a_ext) + end + l_chunk_size_line.append (crlf) + a_output.put_string (l_chunk_size_line) + + -- Optional trailer + if a_trailer /= Void and then not a_trailer.is_empty then + a_output.put_string (a_trailer) + end + + -- Final CRLF + a_output.put_string (crlf) + end + + append_file_content_to_socket_using_chunked_transfer_encoding (a_file: FILE; a_len: INTEGER; a_chunk_size: INTEGER; a_output: NETWORK_STREAM_SOCKET) + -- Append `a_file' content as chunks of `a_chunk_size' length to `a_output'. -- If `a_len' >= 0 then read only `a_len' characters. require a_file_readable: a_file.exists and then a_file.is_access_readable @@ -523,7 +620,44 @@ feature {NONE} -- Helpers until l_count = 0 or a_file.exhausted loop - a_file.read_stream_thread_aware (l_count.min (2_048)) + a_file.read_stream_thread_aware (l_count.min (a_chunk_size)) + put_chunk (a_file.last_string, Void, a_output) + l_count := l_count - a_file.bytes_read + end + if not l_was_open then + a_file.close + end + put_chunk_end (Void, Void, a_output) + end + end + + append_file_content_to_socket (a_file: FILE; a_len: INTEGER; a_output: NETWORK_STREAM_SOCKET) + -- Append `a_file' content to `a_output'. + -- If `a_len' >= 0 then read only `a_len' characters. + require + a_file_readable: a_file.exists and then a_file.is_access_readable + local + l_was_open: BOOLEAN + l_count, l_buffer_size: INTEGER + do + if a_len >= 0 then + l_count := a_len + else + l_count := a_file.count + end + if l_count > 0 then + l_was_open := a_file.is_open_read + if a_file.is_open_read then + l_was_open := True + else + a_file.open_read + end + from + l_buffer_size := buffer_size + until + l_count = 0 or a_file.exhausted + loop + a_file.read_stream_thread_aware (l_count.min (l_buffer_size)) a_output.put_string (a_file.last_string) l_count := l_count - a_file.bytes_read end @@ -541,6 +675,7 @@ feature {NONE} -- Helpers local l_was_open: BOOLEAN l_count: INTEGER + l_buffer_size: INTEGER do if a_len >= 0 then l_count := a_len @@ -555,11 +690,11 @@ feature {NONE} -- Helpers a_file.open_read end from - + l_buffer_size := buffer_size until l_count = 0 or a_file.exhausted loop - a_file.read_stream_thread_aware (l_count.min (2_048)) + a_file.read_stream_thread_aware (l_count.min (l_buffer_size)) a_output.append (a_file.last_string) l_count := l_count - a_file.bytes_read end @@ -632,7 +767,7 @@ feature {NONE} -- Helpers -- FIXME: check solution! from l_count := 0 - l_chunk_size := 1_024 + l_chunk_size := buffer_size n := l_chunk_size --| value to satisfy until condition on first loop. until n < l_chunk_size or not a_socket.readable @@ -718,16 +853,42 @@ feature {NONE} -- Helpers end end - new_mime_boundary: STRING + new_mime_boundary (a_data: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_32]): STRING -- New MIME boundary. + local + s: STRING + ran: RANDOM + n: INTEGER + i,j: INTEGER do - -- FIXME: better boundary creation - Result := "----------------------------5eadfcf3bb3e" + across + a_data as ic + loop + i := i + ic.item.count + ic.key.count + end + create ran.set_seed (i) -- FIXME: use a real random seed. + ran.start + ran.forth + n := (20 * ran.real_item).truncated_to_integer + create Result.make_filled ('-', 3 + n) + s := "_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + from + until + Result.count >= 40 + loop + ran.forth + j := (ran.real_item * s.count).truncated_to_integer.max (1) + Result.append_character (s[j]) + end + check Result.count = 40 and Result.starts_with ("---") end end + crlf: STRING = "%R%N" + -- CR and NL sequence. + invariant note - copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2016, 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/tests/test_net_with_web.e b/library/network/http_client/tests/test_net_with_web.e index 1c551aac..94ca734b 100644 --- a/library/network/http_client/tests/test_net_with_web.e +++ b/library/network/http_client/tests/test_net_with_web.e @@ -64,4 +64,9 @@ feature -- Tests test_get_with_authentication end + net_test_post_with_file_using_chunked_transfer_encoding + do + test_post_with_file_using_chunked_transfer_encoding + end + end diff --git a/library/network/http_client/tests/test_with_web_i.e b/library/network/http_client/tests/test_with_web_i.e index f386d5cb..3f3411a1 100644 --- a/library/network/http_client/tests/test_with_web_i.e +++ b/library/network/http_client/tests/test_with_web_i.e @@ -253,6 +253,38 @@ feature -- Factory end end + test_post_with_file_using_chunked_transfer_encoding + local + sess: HTTP_CLIENT_SESSION + h: STRING_8 + l_ctx: HTTP_CLIENT_REQUEST_CONTEXT + do + if attached global_requestbin_path as requestbin_path then + + -- POST REQUEST WITH A FILE AND FORM DATA + -- check requestbin to ensure the file and form parameters are correctly received + -- set filename to a local file + sess := new_session ("http://requestb.in") + create l_ctx.make + l_ctx.add_header ("Transfer-Encoding", "chunked") + l_ctx.set_upload_filename ("logo.jpg") + create h.make_empty + if + attached sess.post (requestbin_path, l_ctx, Void) as res and then + attached res.headers as hds + then + across + hds as c + loop + h.append (c.item.name + ": " + c.item.value + "%R%N") + end + end + print (h) + else + assert ("Has requestbin path", False) + end + end + test_get_with_redirection local sess: HTTP_CLIENT_SESSION From b66cfce13822efada434e266cde4700acf7dea48 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 22:23:26 +0200 Subject: [PATCH 10/30] Use custom variable `net_ssl_enabled` instead of `httpd_ssl_enabled` for the http_netword lib. --- .../connectors/standalone/lib/httpd/http_network-safe.ecf | 6 +++--- .../ewsgi/connectors/standalone/lib/httpd/http_network.ecf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network-safe.ecf b/library/server/ewsgi/connectors/standalone/lib/httpd/http_network-safe.ecf index 68edf7df..60af0557 100644 --- a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network-safe.ecf +++ b/library/server/ewsgi/connectors/standalone/lib/httpd/http_network-safe.ecf @@ -26,13 +26,13 @@ - + /httpd_stream_ssl_socket_ext.e$ - + @@ -43,7 +43,7 @@ - + diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network.ecf b/library/server/ewsgi/connectors/standalone/lib/httpd/http_network.ecf index 9f4067ec..9ade0502 100644 --- a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network.ecf +++ b/library/server/ewsgi/connectors/standalone/lib/httpd/http_network.ecf @@ -27,13 +27,13 @@ - + /httpd_stream_ssl_socket_ext.e$ - + @@ -44,7 +44,7 @@ - + From c132d7734b9d9e1b3d4dade19be746b47d5b25b7 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 22:54:21 +0200 Subject: [PATCH 11/30] Moved httpd library from ewsgi/connectors/standalone/lib/httpd to httpd. Reused the http_network library as well inside httpd library. --- .../connectors/standalone/standalone-safe.ecf | 3 +- .../connectors/standalone/standalone.ecf | 3 +- .../none/httpd_connection_handler.e | 0 .../concurrency/none/httpd_request_handler.e | 0 .../none/httpd_request_handler_factory.e | 0 .../scoop/httpd_connection_handler.e | 0 .../concurrency/scoop/httpd_request_handler.e | 0 .../scoop/httpd_request_handler_factory.e | 0 .../concurrency/scoop/pool/concurrent_pool.e | 0 .../scoop/pool/concurrent_pool_factory.e | 0 .../scoop/pool/concurrent_pool_item.e | 0 .../thread/httpd_connection_handler.e | 0 .../thread/httpd_request_handler.e | 0 .../thread/httpd_request_handler_factory.e | 0 .../concurrency/thread/pool/pooled_thread.e | 0 .../concurrency/thread/pool/thread_pool.e | 0 .../configuration/httpd_configuration_i.e | 0 .../httpd/configuration/httpd_constants.e | 0 .../configuration/httpd_request_settings.e | 0 .../lib => }/httpd/http_network-safe.ecf | 29 ++++++++++++++ .../lib => }/httpd/http_network.ecf | 28 +++++++++++++ .../standalone/lib => }/httpd/httpd-safe.ecf | 39 ++++--------------- .../standalone/lib => }/httpd/httpd.ecf | 39 ++++--------------- .../httpd/httpd_connection_handler_i.e | 0 .../lib => }/httpd/httpd_controller.e | 0 .../lib => }/httpd/httpd_debug_facilities.e | 0 .../standalone/lib => }/httpd/httpd_logger.e | 0 .../lib => }/httpd/httpd_logger_constants.e | 0 .../httpd/httpd_request_handler_factory_i.e | 0 .../lib => }/httpd/httpd_request_handler_i.e | 0 .../lib => }/httpd/httpd_server_i.e | 0 .../lib => }/httpd/httpd_server_observer.e | 0 .../httpd/network/httpd_stream_socket.e | 0 .../httpd/network/httpd_stream_socket_ext.e | 0 .../network/ssl/httpd_stream_ssl_socket.e | 0 .../network/ssl/httpd_stream_ssl_socket_ext.e | 0 .../until_16_05/httpd_stream_socket_ext.e | 0 .../ssl/httpd_stream_ssl_socket_ext.e | 0 .../httpd/no_ssl/httpd_configuration.e | 0 .../lib => }/httpd/no_ssl/httpd_server.e | 0 .../httpd/no_ssl/httpd_socket_factory.e | 0 .../standalone/lib => }/httpd/package.iron | 0 .../spec/include_until_16_05/ew_httpd_net.h | 0 .../lib => }/httpd/ssl/httpd_configuration.e | 0 .../lib => }/httpd/ssl/httpd_server.e | 0 .../lib => }/httpd/ssl/httpd_socket_factory.e | 0 .../server/wsf/connector/standalone-safe.ecf | 10 ++--- .../server/wsf/default/standalone-safe.ecf | 8 ++-- 48 files changed, 86 insertions(+), 73 deletions(-) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/none/httpd_connection_handler.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/none/httpd_request_handler.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/none/httpd_request_handler_factory.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/scoop/httpd_connection_handler.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/scoop/httpd_request_handler.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/scoop/httpd_request_handler_factory.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/scoop/pool/concurrent_pool.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/scoop/pool/concurrent_pool_factory.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/scoop/pool/concurrent_pool_item.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/thread/httpd_connection_handler.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/thread/httpd_request_handler.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/thread/httpd_request_handler_factory.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/thread/pool/pooled_thread.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/concurrency/thread/pool/thread_pool.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/configuration/httpd_configuration_i.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/configuration/httpd_constants.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/configuration/httpd_request_settings.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/http_network-safe.ecf (71%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/http_network.ecf (72%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd-safe.ecf (75%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd.ecf (71%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_connection_handler_i.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_controller.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_debug_facilities.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_logger.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_logger_constants.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_request_handler_factory_i.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_request_handler_i.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_server_i.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/httpd_server_observer.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/network/httpd_stream_socket.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/network/httpd_stream_socket_ext.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/network/ssl/httpd_stream_ssl_socket.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/network/ssl/httpd_stream_ssl_socket_ext.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/network/until_16_05/httpd_stream_socket_ext.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/network/until_16_05/ssl/httpd_stream_ssl_socket_ext.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/no_ssl/httpd_configuration.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/no_ssl/httpd_server.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/no_ssl/httpd_socket_factory.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/package.iron (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/spec/include_until_16_05/ew_httpd_net.h (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/ssl/httpd_configuration.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/ssl/httpd_server.e (100%) rename library/server/{ewsgi/connectors/standalone/lib => }/httpd/ssl/httpd_socket_factory.e (100%) diff --git a/library/server/ewsgi/connectors/standalone/standalone-safe.ecf b/library/server/ewsgi/connectors/standalone/standalone-safe.ecf index 84514c66..7d2dcfaa 100644 --- a/library/server/ewsgi/connectors/standalone/standalone-safe.ecf +++ b/library/server/ewsgi/connectors/standalone/standalone-safe.ecf @@ -16,7 +16,8 @@ - + + diff --git a/library/server/ewsgi/connectors/standalone/standalone.ecf b/library/server/ewsgi/connectors/standalone/standalone.ecf index 89c4189e..5a766114 100644 --- a/library/server/ewsgi/connectors/standalone/standalone.ecf +++ b/library/server/ewsgi/connectors/standalone/standalone.ecf @@ -15,7 +15,8 @@ - + + diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/none/httpd_connection_handler.e b/library/server/httpd/concurrency/none/httpd_connection_handler.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/none/httpd_connection_handler.e rename to library/server/httpd/concurrency/none/httpd_connection_handler.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/none/httpd_request_handler.e b/library/server/httpd/concurrency/none/httpd_request_handler.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/none/httpd_request_handler.e rename to library/server/httpd/concurrency/none/httpd_request_handler.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/none/httpd_request_handler_factory.e b/library/server/httpd/concurrency/none/httpd_request_handler_factory.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/none/httpd_request_handler_factory.e rename to library/server/httpd/concurrency/none/httpd_request_handler_factory.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/httpd_connection_handler.e b/library/server/httpd/concurrency/scoop/httpd_connection_handler.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/httpd_connection_handler.e rename to library/server/httpd/concurrency/scoop/httpd_connection_handler.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/httpd_request_handler.e b/library/server/httpd/concurrency/scoop/httpd_request_handler.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/httpd_request_handler.e rename to library/server/httpd/concurrency/scoop/httpd_request_handler.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/httpd_request_handler_factory.e b/library/server/httpd/concurrency/scoop/httpd_request_handler_factory.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/httpd_request_handler_factory.e rename to library/server/httpd/concurrency/scoop/httpd_request_handler_factory.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/pool/concurrent_pool.e b/library/server/httpd/concurrency/scoop/pool/concurrent_pool.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/pool/concurrent_pool.e rename to library/server/httpd/concurrency/scoop/pool/concurrent_pool.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/pool/concurrent_pool_factory.e b/library/server/httpd/concurrency/scoop/pool/concurrent_pool_factory.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/pool/concurrent_pool_factory.e rename to library/server/httpd/concurrency/scoop/pool/concurrent_pool_factory.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/pool/concurrent_pool_item.e b/library/server/httpd/concurrency/scoop/pool/concurrent_pool_item.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/scoop/pool/concurrent_pool_item.e rename to library/server/httpd/concurrency/scoop/pool/concurrent_pool_item.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/httpd_connection_handler.e b/library/server/httpd/concurrency/thread/httpd_connection_handler.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/httpd_connection_handler.e rename to library/server/httpd/concurrency/thread/httpd_connection_handler.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/httpd_request_handler.e b/library/server/httpd/concurrency/thread/httpd_request_handler.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/httpd_request_handler.e rename to library/server/httpd/concurrency/thread/httpd_request_handler.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/httpd_request_handler_factory.e b/library/server/httpd/concurrency/thread/httpd_request_handler_factory.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/httpd_request_handler_factory.e rename to library/server/httpd/concurrency/thread/httpd_request_handler_factory.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/pool/pooled_thread.e b/library/server/httpd/concurrency/thread/pool/pooled_thread.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/pool/pooled_thread.e rename to library/server/httpd/concurrency/thread/pool/pooled_thread.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/pool/thread_pool.e b/library/server/httpd/concurrency/thread/pool/thread_pool.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/concurrency/thread/pool/thread_pool.e rename to library/server/httpd/concurrency/thread/pool/thread_pool.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/configuration/httpd_configuration_i.e b/library/server/httpd/configuration/httpd_configuration_i.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/configuration/httpd_configuration_i.e rename to library/server/httpd/configuration/httpd_configuration_i.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/configuration/httpd_constants.e b/library/server/httpd/configuration/httpd_constants.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/configuration/httpd_constants.e rename to library/server/httpd/configuration/httpd_constants.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/configuration/httpd_request_settings.e b/library/server/httpd/configuration/httpd_request_settings.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/configuration/httpd_request_settings.e rename to library/server/httpd/configuration/httpd_request_settings.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network-safe.ecf b/library/server/httpd/http_network-safe.ecf similarity index 71% rename from library/server/ewsgi/connectors/standalone/lib/httpd/http_network-safe.ecf rename to library/server/httpd/http_network-safe.ecf index 68edf7df..66d8878c 100644 --- a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network-safe.ecf +++ b/library/server/httpd/http_network-safe.ecf @@ -10,12 +10,19 @@ + + + + + + + @@ -25,11 +32,25 @@ + + + + + + /httpd_stream_ssl_socket_ext.e$ + + + + + + + + @@ -42,6 +63,14 @@ + + + + + + + + diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network.ecf b/library/server/httpd/http_network.ecf similarity index 72% rename from library/server/ewsgi/connectors/standalone/lib/httpd/http_network.ecf rename to library/server/httpd/http_network.ecf index 9f4067ec..b90cf5d9 100644 --- a/library/server/ewsgi/connectors/standalone/lib/httpd/http_network.ecf +++ b/library/server/httpd/http_network.ecf @@ -14,9 +14,15 @@ + + + + + + @@ -26,11 +32,25 @@ + + + + + + /httpd_stream_ssl_socket_ext.e$ + + + + + + + + @@ -43,6 +63,14 @@ + + + + + + + + diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd-safe.ecf b/library/server/httpd/httpd-safe.ecf similarity index 75% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd-safe.ecf rename to library/server/httpd/httpd-safe.ecf index 7f1b6694..077126be 100644 --- a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd-safe.ecf +++ b/library/server/httpd/httpd-safe.ecf @@ -22,8 +22,12 @@ + + + + @@ -43,10 +47,14 @@ + + + + @@ -67,36 +75,5 @@ - - - /httpd_stream_socket_ext.e$ - - - - - - - - - - /httpd_stream_ssl_socket_ext.e$ - - - - - - - - - - - - - - - - - - diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd.ecf b/library/server/httpd/httpd.ecf similarity index 71% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd.ecf rename to library/server/httpd/httpd.ecf index e6e87f66..8d357c2b 100644 --- a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd.ecf +++ b/library/server/httpd/httpd.ecf @@ -11,8 +11,12 @@ + + + + @@ -23,37 +27,6 @@ - - - /httpd_stream_socket_ext.e$ - - - - - - - - - - /httpd_stream_ssl_socket_ext.e$ - - - - - - - - - - - - - - - - - - /concurrency$ @@ -63,10 +36,14 @@ + + + + diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_connection_handler_i.e b/library/server/httpd/httpd_connection_handler_i.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_connection_handler_i.e rename to library/server/httpd/httpd_connection_handler_i.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_controller.e b/library/server/httpd/httpd_controller.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_controller.e rename to library/server/httpd/httpd_controller.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_debug_facilities.e b/library/server/httpd/httpd_debug_facilities.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_debug_facilities.e rename to library/server/httpd/httpd_debug_facilities.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_logger.e b/library/server/httpd/httpd_logger.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_logger.e rename to library/server/httpd/httpd_logger.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_logger_constants.e b/library/server/httpd/httpd_logger_constants.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_logger_constants.e rename to library/server/httpd/httpd_logger_constants.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_factory_i.e b/library/server/httpd/httpd_request_handler_factory_i.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_factory_i.e rename to library/server/httpd/httpd_request_handler_factory_i.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_i.e b/library/server/httpd/httpd_request_handler_i.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_request_handler_i.e rename to library/server/httpd/httpd_request_handler_i.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_server_i.e b/library/server/httpd/httpd_server_i.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_server_i.e rename to library/server/httpd/httpd_server_i.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/httpd_server_observer.e b/library/server/httpd/httpd_server_observer.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/httpd_server_observer.e rename to library/server/httpd/httpd_server_observer.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/network/httpd_stream_socket.e b/library/server/httpd/network/httpd_stream_socket.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/network/httpd_stream_socket.e rename to library/server/httpd/network/httpd_stream_socket.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/network/httpd_stream_socket_ext.e b/library/server/httpd/network/httpd_stream_socket_ext.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/network/httpd_stream_socket_ext.e rename to library/server/httpd/network/httpd_stream_socket_ext.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/network/ssl/httpd_stream_ssl_socket.e b/library/server/httpd/network/ssl/httpd_stream_ssl_socket.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/network/ssl/httpd_stream_ssl_socket.e rename to library/server/httpd/network/ssl/httpd_stream_ssl_socket.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/network/ssl/httpd_stream_ssl_socket_ext.e b/library/server/httpd/network/ssl/httpd_stream_ssl_socket_ext.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/network/ssl/httpd_stream_ssl_socket_ext.e rename to library/server/httpd/network/ssl/httpd_stream_ssl_socket_ext.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/network/until_16_05/httpd_stream_socket_ext.e b/library/server/httpd/network/until_16_05/httpd_stream_socket_ext.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/network/until_16_05/httpd_stream_socket_ext.e rename to library/server/httpd/network/until_16_05/httpd_stream_socket_ext.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/network/until_16_05/ssl/httpd_stream_ssl_socket_ext.e b/library/server/httpd/network/until_16_05/ssl/httpd_stream_ssl_socket_ext.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/network/until_16_05/ssl/httpd_stream_ssl_socket_ext.e rename to library/server/httpd/network/until_16_05/ssl/httpd_stream_ssl_socket_ext.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/no_ssl/httpd_configuration.e b/library/server/httpd/no_ssl/httpd_configuration.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/no_ssl/httpd_configuration.e rename to library/server/httpd/no_ssl/httpd_configuration.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/no_ssl/httpd_server.e b/library/server/httpd/no_ssl/httpd_server.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/no_ssl/httpd_server.e rename to library/server/httpd/no_ssl/httpd_server.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/no_ssl/httpd_socket_factory.e b/library/server/httpd/no_ssl/httpd_socket_factory.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/no_ssl/httpd_socket_factory.e rename to library/server/httpd/no_ssl/httpd_socket_factory.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/package.iron b/library/server/httpd/package.iron similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/package.iron rename to library/server/httpd/package.iron diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/spec/include_until_16_05/ew_httpd_net.h b/library/server/httpd/spec/include_until_16_05/ew_httpd_net.h similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/spec/include_until_16_05/ew_httpd_net.h rename to library/server/httpd/spec/include_until_16_05/ew_httpd_net.h diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/ssl/httpd_configuration.e b/library/server/httpd/ssl/httpd_configuration.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/ssl/httpd_configuration.e rename to library/server/httpd/ssl/httpd_configuration.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/ssl/httpd_server.e b/library/server/httpd/ssl/httpd_server.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/ssl/httpd_server.e rename to library/server/httpd/ssl/httpd_server.e diff --git a/library/server/ewsgi/connectors/standalone/lib/httpd/ssl/httpd_socket_factory.e b/library/server/httpd/ssl/httpd_socket_factory.e similarity index 100% rename from library/server/ewsgi/connectors/standalone/lib/httpd/ssl/httpd_socket_factory.e rename to library/server/httpd/ssl/httpd_socket_factory.e diff --git a/library/server/wsf/connector/standalone-safe.ecf b/library/server/wsf/connector/standalone-safe.ecf index 7ad62d20..384c08b6 100644 --- a/library/server/wsf/connector/standalone-safe.ecf +++ b/library/server/wsf/connector/standalone-safe.ecf @@ -1,5 +1,5 @@ - + @@ -7,16 +7,16 @@ /\.git$ /\.svn$ - - + - + - + diff --git a/library/server/wsf/default/standalone-safe.ecf b/library/server/wsf/default/standalone-safe.ecf index 9716756e..845a0a9d 100644 --- a/library/server/wsf/default/standalone-safe.ecf +++ b/library/server/wsf/default/standalone-safe.ecf @@ -1,5 +1,5 @@ - + @@ -7,11 +7,11 @@ /\.git$ /\.svn$ - - - + + From 981942b2d64dbf94eacf32b2da1456280128b176 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Oct 2016 23:27:55 +0200 Subject: [PATCH 12/30] Extracted network socket classes from httpd folder, and created a new library/network/http_network library. Renamed HTTPD_STREAM_SOCKET as HTTP_STREAM_SOCKET. Made http_client (net) library use the new http_network library. --- .../http_client/net_http_client-safe.ecf | 8 ++++ .../network/http_client/net_http_client.ecf | 8 ++++ .../net_http_client_connection.e | 6 +-- .../src/spec/net/net_http_client_request.e | 44 +++++++++---------- .../net/no_ssl/ssl_network_stream_socket.e | 22 ---------- .../http_network}/http_network-safe.ecf | 23 ++++++++-- .../http_network}/http_network.ecf | 16 +++++-- library/network/http_network/license.lic | 10 +++++ .../spec/include_until_16_05/ew_httpd_net.h | 0 .../http_network/src/http_stream_socket.e} | 8 ++-- .../src/http_stream_socket_ext.e} | 2 +- .../src/no_ssl/http_stream_ssl_socket.e | 27 ++++++++++++ .../src/ssl/http_stream_ssl_socket.e} | 8 ++-- .../src/ssl/http_stream_ssl_socket_ext.e} | 4 +- .../src/until_16_05/http_stream_socket_ext.e} | 2 +- .../ssl/http_stream_ssl_socket_ext.e} | 4 +- .../connectors/standalone/standalone-safe.ecf | 2 +- .../connectors/standalone/standalone.ecf | 2 +- .../none/httpd_connection_handler.e | 4 +- .../scoop/httpd_connection_handler.e | 8 ++-- .../thread/httpd_connection_handler.e | 4 +- library/server/httpd/httpd-safe.ecf | 12 +---- library/server/httpd/httpd.ecf | 2 +- .../server/httpd/httpd_connection_handler_i.e | 2 +- .../server/httpd/httpd_request_handler_i.e | 14 +++--- library/server/httpd/httpd_server_i.e | 4 +- library/server/httpd/license.lic | 10 +++++ .../httpd/no_ssl/httpd_socket_factory.e | 2 +- library/server/httpd/ssl/httpd_server.e | 2 +- .../server/httpd/ssl/httpd_socket_factory.e | 2 +- 30 files changed, 160 insertions(+), 102 deletions(-) delete mode 100644 library/network/http_client/src/spec/net/no_ssl/ssl_network_stream_socket.e rename library/{server/httpd => network/http_network}/http_network-safe.ecf (76%) rename library/{server/httpd => network/http_network}/http_network.ecf (83%) create mode 100644 library/network/http_network/license.lic rename library/{server/httpd => network/http_network}/spec/include_until_16_05/ew_httpd_net.h (100%) rename library/{server/httpd/network/httpd_stream_socket.e => network/http_network/src/http_stream_socket.e} (96%) rename library/{server/httpd/network/httpd_stream_socket_ext.e => network/http_network/src/http_stream_socket_ext.e} (89%) create mode 100644 library/network/http_network/src/no_ssl/http_stream_ssl_socket.e rename library/{server/httpd/network/ssl/httpd_stream_ssl_socket.e => network/http_network/src/ssl/http_stream_ssl_socket.e} (96%) rename library/{server/httpd/network/ssl/httpd_stream_ssl_socket_ext.e => network/http_network/src/ssl/http_stream_ssl_socket_ext.e} (78%) rename library/{server/httpd/network/until_16_05/httpd_stream_socket_ext.e => network/http_network/src/until_16_05/http_stream_socket_ext.e} (99%) rename library/{server/httpd/network/until_16_05/ssl/httpd_stream_ssl_socket_ext.e => network/http_network/src/until_16_05/ssl/http_stream_ssl_socket_ext.e} (89%) create mode 100644 library/server/httpd/license.lic diff --git a/library/network/http_client/net_http_client-safe.ecf b/library/network/http_client/net_http_client-safe.ecf index 642bf916..30e47099 100644 --- a/library/network/http_client/net_http_client-safe.ecf +++ b/library/network/http_client/net_http_client-safe.ecf @@ -13,8 +13,12 @@ + + + + @@ -25,10 +29,14 @@