From 9c7e29b8361cadde235fc73b41335a47b822a99b Mon Sep 17 00:00:00 2001 From: jvelilla Date: Mon, 6 Apr 2015 17:46:59 -0300 Subject: [PATCH] Added descriptions and comments --- .../httpd/configuration/httpd_configuration_i.e | 15 ++++++++++++++- .../standalone/src/httpd/httpd_server_i.e | 7 +++++-- .../src/httpd/ssl/httpd_configuration.e | 5 ++++- .../wgi_httpd_request_handler_factory.e | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e index 8d2b9a7b..e9f669db 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e @@ -60,7 +60,7 @@ feature -- Access: SSL -- the signed certificate. ca_key: STRING - -- private key to the sertificate. + -- private key to the certificate. ssl_protocol: NATURAL -- By default protocol is tls 1.2. @@ -75,6 +75,7 @@ feature -- Element change else create {IMMUTABLE_STRING_8} http_server_name.make_from_separate (v) end + --| Missing postcondition. end unset_http_server_name @@ -201,31 +202,43 @@ feature -- SSL Helpers set_ssl_protocol_to_ssl_2_or_3 -- Set `ssl_protocol' with `Ssl_23'. deferred + ensure + ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Ssl_23 end set_ssl_protocol_to_ssl_3 -- Set `ssl_protocol' with `Ssl_3'. deferred + ensure + ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Ssl_3 end set_ssl_protocol_to_tls_1_0 -- Set `ssl_protocol' with `Tls_1_0'. deferred + ensure + ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Tls_1_0 end set_ssl_protocol_to_tls_1_1 -- Set `ssl_protocol' with `Tls_1_1'. deferred + ensure + ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Tls_1_1 end set_ssl_protocol_to_tls_1_2 -- Set `ssl_protocol' with `Tls_1_2'. deferred + ensure + ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Tls_1_2 end set_ssl_protocol_to_dtls_1_0 -- Set `ssl_protocol' with `Dtls_1_0'. deferred + ensure + ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Dtls_1_0 end note diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e index 15caf568..39a7c894 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e @@ -1,5 +1,5 @@ note - description: "Summary description for {HTTPD_SERVER_I}." + description: "HTTPD server interface" date: "$Date$" revision: "$Revision$" @@ -14,7 +14,6 @@ inherit feature {NONE} -- Initialization make (a_factory: like factory) - -- `a_cfg': server configuration -- `a_factory': connection handler builder require fac_is_separated: {PLATFORM}.is_scoop_capable implies not attached {HTTPD_REQUEST_HANDLER_FACTORY} a_factory @@ -67,6 +66,7 @@ feature -- Callbacks observer: detachable separate HTTPD_SERVER_OBSERVER set_observer (obs: like observer) + -- Set `observer' with `obs' do observer := obs end @@ -320,8 +320,11 @@ feature -- Output output: detachable FILE set_log_output (f: FILE) + -- Set `output' with `f'. do output := f + ensure + output_set: output = f end log (a_message: separate READABLE_STRING_8) diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/ssl/httpd_configuration.e b/library/server/ewsgi/connectors/standalone/src/httpd/ssl/httpd_configuration.e index d702bac5..eb6d656e 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/ssl/httpd_configuration.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/ssl/httpd_configuration.e @@ -18,9 +18,12 @@ create feature {NONE} -- Initialization make + -- Create a new instance and set ssl protocol to tls_1_2. do Precursor - ssl_protocol := {SSL_PROTOCOL}.tls_1_2 + set_ssl_protocol_to_tls_1_2 + ensure then + ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.tls_1_2 end feature -- Access diff --git a/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler_factory.e b/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler_factory.e index b853eb10..48ea569c 100644 --- a/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler_factory.e +++ b/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler_factory.e @@ -1,5 +1,5 @@ note - description: "Summary description for {WGI_HTTPD_REQUEST_HANDLER_FACTORY}." + description: "Implementation of WGI request handler factory for WGI_STANDALOE_CONNECTOR." date: "$Date$" revision: "$Revision$"