From af5fc75743ba5685c5220b9c747a54aed6ce9eb3 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 14 Jun 2016 16:01:37 +0200 Subject: [PATCH] Using passive regions. Improve connector options mainly for standalone connector. Updated "simple" example to return a timestamp. --- examples/simple/application.e | 7 ++- examples/simple/application_execution.e | 11 +++-- examples/simple/simple.ecf | 21 +++------ .../scoop/httpd_connection_handler.e | 4 +- .../thread/httpd_connection_handler.e | 2 +- .../configuration/httpd_configuration_i.e | 7 ++- .../src/httpd/httpd_request_handler_i.e | 16 ++----- .../standalone/src/httpd/httpd_server_i.e | 2 +- .../wgi_httpd_request_handler_factory.e | 4 +- .../standalone/src/wgi_standalone_connector.e | 6 +-- .../wsf_standalone_service_launcher.e | 46 ++++++++++--------- .../service/wsf_service_launcher_options.e | 36 +++++++++++++++ 12 files changed, 100 insertions(+), 62 deletions(-) diff --git a/examples/simple/application.e b/examples/simple/application.e index d1de21d9..7d079309 100644 --- a/examples/simple/application.e +++ b/examples/simple/application.e @@ -20,7 +20,12 @@ feature {NONE} -- Initialization initialize -- Initialize current service. do - set_service_option ("port", 9090) + -- Specific to `standalone' connector (the EiffelWeb server). + -- See `{WSF_STANDALONE_SERVICE_LAUNCHER}.initialize' + set_service_option ("port", 9090) + set_service_option ("max_concurrent_connections", 10) + set_service_option ("keep_alive_timeout", 1) + set_service_option ("verbose", True) end diff --git a/examples/simple/application_execution.e b/examples/simple/application_execution.e index b02bdf55..179f215c 100644 --- a/examples/simple/application_execution.e +++ b/examples/simple/application_execution.e @@ -17,10 +17,13 @@ feature -- Basic operations execute local s: STRING - do - -- To send a response we need to setup, the status code and - -- the response headers. - s := "Hello World!" + dt: HTTP_DATE + do + -- To send a response we need to setup, the status code and + -- the response headers. + s := "Hello World!" + create dt.make_now_utc + s.append (" (UTC time is " + dt.rfc850_string + ").") response.put_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/html"], ["Content-Length", s.count.out]>>) response.set_status_code ({HTTP_STATUS_CODE}.ok) response.header.put_content_type_text_html diff --git a/examples/simple/simple.ecf b/examples/simple/simple.ecf index f341867d..dcdf618a 100644 --- a/examples/simple/simple.ecf +++ b/examples/simple/simple.ecf @@ -1,35 +1,28 @@ - + - /EIFGENs$ - /CVS$ /.svn$ + /CVS$ + /EIFGENs$ - + - - + - - - - - -