From 0b00bc4f6892db8169bfb09222513e9a4ce3ebf2 Mon Sep 17 00:00:00 2001 From: jvelilla Date: Mon, 6 Apr 2015 12:24:47 -0300 Subject: [PATCH 1/5] Added Missing Class and feature descriptions. Removed author entry. --- .../examples/demo/application_execution.e | 1 - .../autocompletion/contact_autocompletion.e | 1 - .../demo/autocompletion/flag_autocompletion.e | 43 +++++++++---------- .../autocompletion/google_autocompletion.e | 1 - .../wsf_js_widget/examples/demo/base_page.e | 1 - .../examples/demo/codeview_page.e | 1 - .../examples/demo/googlenews/google_news.e | 1 - .../demo/googlenews/google_news_datasource.e | 1 - .../demo/googlenews/google_news_repeater.e | 1 - .../wsf_js_widget/examples/demo/grid_page.e | 1 - .../examples/demo/own_validator.e | 1 - .../demo/progress/increasing_progresssource.e | 1 - .../examples/demo/repeater_page.e | 1 - .../wsf_js_widget/examples/demo/sample_page.e | 1 - .../wsf_js_widget/examples/demo/slider_page.e | 1 - .../wsf_js_widget/examples/demo/upload_page.e | 1 - .../scoop/httpd_connection_handler.e | 7 +++ .../src/httpd/httpd_connection_handler_i.e | 1 + .../src/httpd/httpd_request_handler_i.e | 13 +++++- .../standalone/test_standalone-safe.ecf | 8 +++- library/server/wsf/src/wsf_execution.e | 6 ++- 21 files changed, 50 insertions(+), 43 deletions(-) diff --git a/draft/library/server/wsf_js_widget/examples/demo/application_execution.e b/draft/library/server/wsf_js_widget/examples/demo/application_execution.e index b0582128..564f5c85 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/application_execution.e +++ b/draft/library/server/wsf_js_widget/examples/demo/application_execution.e @@ -1,6 +1,5 @@ note description: "Summary description for {APPLICATION_EXECUTION}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/autocompletion/contact_autocompletion.e b/draft/library/server/wsf_js_widget/examples/demo/autocompletion/contact_autocompletion.e index d03c428e..502afc95 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/autocompletion/contact_autocompletion.e +++ b/draft/library/server/wsf_js_widget/examples/demo/autocompletion/contact_autocompletion.e @@ -1,6 +1,5 @@ note description: "Summary description for {CONTACT_AUTOCOMPLETION}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/autocompletion/flag_autocompletion.e b/draft/library/server/wsf_js_widget/examples/demo/autocompletion/flag_autocompletion.e index a79596d0..42ab2a5f 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/autocompletion/flag_autocompletion.e +++ b/draft/library/server/wsf_js_widget/examples/demo/autocompletion/flag_autocompletion.e @@ -1,6 +1,5 @@ note description: "Summary description for {FLAG_AUTOCOMPLETION}." - author: "" date: "$Date$" revision: "$Revision$" @@ -33,22 +32,22 @@ feature -- Implementation list := <<["AF", {STRING_32} "Afghanistan"], ["AX", {STRING_32} "Åland Islands"], ["AL", {STRING_32} "Albania"], ["DZ", {STRING_32} "Algeria"], ["AS", {STRING_32} "American Samoa"], ["AD", {STRING_32} "Andorra"], ["AO", {STRING_32} "Angola"], ["AI", {STRING_32} "Anguilla"], - ["AQ", {STRING_32} "Antarctica"], ["AG", {STRING_32} "Antigua and Barbuda"], + ["AQ", {STRING_32} "Antarctica"], ["AG", {STRING_32} "Antigua and Barbuda"], ["AR", {STRING_32} "Argentina"], ["AM", {STRING_32} "Armenia"], ["AW", {STRING_32} "Aruba"], - ["AU", {STRING_32} "Australia"], ["AT", {STRING_32} "Austria"], ["AZ", {STRING_32} "Azerbaijan"], + ["AU", {STRING_32} "Australia"], ["AT", {STRING_32} "Austria"], ["AZ", {STRING_32} "Azerbaijan"], ["BS", {STRING_32} "Bahamas"], ["BH", {STRING_32} "Bahrain"], ["BD", {STRING_32} "Bangladesh"], ["BB", {STRING_32} "Barbados"], ["BY", {STRING_32} "Belarus"], ["BE", {STRING_32} "Belgium"], ["BZ", {STRING_32} "Belize"], ["BJ", {STRING_32} "Benin"], ["BM", {STRING_32} "Bermuda"], ["BT", {STRING_32} "Bhutan"], ["BO", {STRING_32} "Bolivia, Plurinational State of"], ["BQ", {STRING_32} "Bonaire, Sint Eustatius and Saba"], ["BA", {STRING_32} "Bosnia and Herzegovina"], ["BW", {STRING_32} "Botswana"], ["BV", {STRING_32} "Bouvet Island"], - ["BR", {STRING_32} "Brazil"], ["IO", {STRING_32} "British Indian Ocean Territory"], - ["BN", {STRING_32} "Brunei Darussalam"], ["BG", {STRING_32} "Bulgaria"], + ["BR", {STRING_32} "Brazil"], ["IO", {STRING_32} "British Indian Ocean Territory"], + ["BN", {STRING_32} "Brunei Darussalam"], ["BG", {STRING_32} "Bulgaria"], ["BF", {STRING_32} "Burkina Faso"], ["BI", {STRING_32} "Burundi"], ["KH", {STRING_32} "Cambodia"], ["CM", {STRING_32} "Cameroon"], ["CA", {STRING_32} "Canada"], ["CV", {STRING_32} "Cape Verde"], - ["KY", {STRING_32} "Cayman Islands"], ["CF", {STRING_32} "Central African Republic"], + ["KY", {STRING_32} "Cayman Islands"], ["CF", {STRING_32} "Central African Republic"], ["TD", {STRING_32} "Chad"], ["CL", {STRING_32} "Chile"], ["CN", {STRING_32} "China"], - ["CX", {STRING_32} "Christmas Island"], ["CC", {STRING_32} "Cocos (Keeling) Islands"], + ["CX", {STRING_32} "Christmas Island"], ["CC", {STRING_32} "Cocos (Keeling) Islands"], ["CO", {STRING_32} "Colombia"], ["KM", {STRING_32} "Comoros"], ["CG", {STRING_32} "Congo"], ["CD", {STRING_32} "Congo, the Democratic Republic of the"], ["CK", {STRING_32} "Cook Islands"], ["CR", {STRING_32} "Costa Rica"], ["CI", {STRING_32} "Côte d'Ivoire"], @@ -61,11 +60,11 @@ feature -- Implementation ["FO", {STRING_32} "Faroe Islands"], ["FJ", {STRING_32} "Fiji"], ["FI", {STRING_32} "Finland"], ["FR", {STRING_32} "France"], ["GF", {STRING_32} "French Guiana"], ["PF", {STRING_32} "French Polynesia"], ["TF", {STRING_32} "French Southern Territories"], - ["GA", {STRING_32} "Gabon"], ["GM", {STRING_32} "Gambia"], ["GE", {STRING_32} "Georgia"], + ["GA", {STRING_32} "Gabon"], ["GM", {STRING_32} "Gambia"], ["GE", {STRING_32} "Georgia"], ["DE", {STRING_32} "Germany"], ["GH", {STRING_32} "Ghana"], ["GI", {STRING_32} "Gibraltar"], ["GR", {STRING_32} "Greece"], ["GL", {STRING_32} "Greenland"], ["GD", {STRING_32} "Grenada"], - ["GP", {STRING_32} "Guadeloupe"], ["GU", {STRING_32} "Guam"], ["GT", {STRING_32} "Guatemala"], - ["GG", {STRING_32} "Guernsey"], ["GN", {STRING_32} "Guinea"], ["GW", {STRING_32} "Guinea-Bissau"], + ["GP", {STRING_32} "Guadeloupe"], ["GU", {STRING_32} "Guam"], ["GT", {STRING_32} "Guatemala"], + ["GG", {STRING_32} "Guernsey"], ["GN", {STRING_32} "Guinea"], ["GW", {STRING_32} "Guinea-Bissau"], ["GY", {STRING_32} "Guyana"], ["HT", {STRING_32} "Haiti"], ["HM", {STRING_32} "Heard Island and McDonald Islands"], ["VA", {STRING_32} "Holy See (Vatican City State)"], ["HN", {STRING_32} "Honduras"], ["HK", {STRING_32} "Hong Kong"], ["HU", {STRING_32} "Hungary"], @@ -92,41 +91,41 @@ feature -- Implementation ["NA", {STRING_32} "Namibia"], ["NR", {STRING_32} "Nauru"], ["NP", {STRING_32} "Nepal"], ["NL", {STRING_32} "Netherlands"], ["NC", {STRING_32} "New Caledonia"], ["NZ", {STRING_32} "New Zealand"], ["NI", {STRING_32} "Nicaragua"], ["NE", {STRING_32} "Niger"], - ["NG", {STRING_32} "Nigeria"], ["NU", {STRING_32} "Niue"], ["NF", {STRING_32} "Norfolk Island"], + ["NG", {STRING_32} "Nigeria"], ["NU", {STRING_32} "Niue"], ["NF", {STRING_32} "Norfolk Island"], ["MP", {STRING_32} "Northern Mariana Islands"], ["NO", {STRING_32} "Norway"], ["OM", {STRING_32} "Oman"], ["PK", {STRING_32} "Pakistan"], ["PW", {STRING_32} "Palau"], ["PS", {STRING_32} "Palestinian Territory, Occupied"], ["PA", {STRING_32} "Panama"], - ["PG", {STRING_32} "Papua New Guinea"], ["PY", {STRING_32} "Paraguay"], ["PE", {STRING_32} "Peru"], + ["PG", {STRING_32} "Papua New Guinea"], ["PY", {STRING_32} "Paraguay"], ["PE", {STRING_32} "Peru"], ["PH", {STRING_32} "Philippines"], ["PN", {STRING_32} "Pitcairn"], ["PL", {STRING_32} "Poland"], ["PT", {STRING_32} "Portugal"], ["PR", {STRING_32} "Puerto Rico"], ["QA", {STRING_32} "Qatar"], ["RE", {STRING_32} "Réunion"], ["RO", {STRING_32} "Romania"], ["RU", {STRING_32} "Russian Federation"], ["RW", {STRING_32} "Rwanda"], ["BL", {STRING_32} "Saint Barthélemy"], ["SH", {STRING_32} "Saint Helena, Ascension and Tristan da Cunha"], - ["KN", {STRING_32} "Saint Kitts and Nevis"], ["LC", {STRING_32} "Saint Lucia"], ["MF", {STRING_32} "Saint Martin (French part)"], + ["KN", {STRING_32} "Saint Kitts and Nevis"], ["LC", {STRING_32} "Saint Lucia"], ["MF", {STRING_32} "Saint Martin (French part)"], ["PM", {STRING_32} "Saint Pierre and Miquelon"], - ["VC", {STRING_32} "Saint Vincent and the Grenadines"], ["WS", {STRING_32} "Samoa"], + ["VC", {STRING_32} "Saint Vincent and the Grenadines"], ["WS", {STRING_32} "Samoa"], ["SM", {STRING_32} "San Marino"], ["ST", {STRING_32} "Sao Tome and Principe"], ["SA", {STRING_32} "Saudi Arabia"], ["SN", {STRING_32} "Senegal"], ["RS", {STRING_32} "Serbia"], ["SC", {STRING_32} "Seychelles"], ["SL", {STRING_32} "Sierra Leone"], - ["SG", {STRING_32} "Singapore"], ["SX", {STRING_32} "Sint Maarten (Dutch part)"], ["SK", {STRING_32} "Slovakia"], + ["SG", {STRING_32} "Singapore"], ["SX", {STRING_32} "Sint Maarten (Dutch part)"], ["SK", {STRING_32} "Slovakia"], ["SI", {STRING_32} "Slovenia"], ["SB", {STRING_32} "Solomon Islands"], - ["SO", {STRING_32} "Somalia"], ["ZA", {STRING_32} "South Africa"], ["GS", {STRING_32} "South Georgia and the South Sandwich Islands"], - ["SS", {STRING_32} "South Sudan"], + ["SO", {STRING_32} "Somalia"], ["ZA", {STRING_32} "South Africa"], ["GS", {STRING_32} "South Georgia and the South Sandwich Islands"], + ["SS", {STRING_32} "South Sudan"], ["ES", {STRING_32} "Spain"], ["LK", {STRING_32} "Sri Lanka"], ["SD", {STRING_32} "Sudan"], ["SR", {STRING_32} "Suriname"], - ["SJ", {STRING_32} "Svalbard and Jan Mayen"], + ["SJ", {STRING_32} "Svalbard and Jan Mayen"], ["SZ", {STRING_32} "Swaziland"], ["SE", {STRING_32} "Sweden"], ["CH", {STRING_32} "Switzerland"], - ["SY", {STRING_32} "Syrian Arab Republic"], + ["SY", {STRING_32} "Syrian Arab Republic"], ["TW", {STRING_32} "Taiwan, Province of China"], ["TJ", {STRING_32} "Tajikistan"], ["TZ", {STRING_32} "Tanzania, United Republic of"], ["TH", {STRING_32} "Thailand"], - ["TL", {STRING_32} "Timor-Leste"], ["TG", {STRING_32} "Togo"], ["TK", {STRING_32} "Tokelau"], + ["TL", {STRING_32} "Timor-Leste"], ["TG", {STRING_32} "Togo"], ["TK", {STRING_32} "Tokelau"], ["TO", {STRING_32} "Tonga"], ["TT", {STRING_32} "Trinidad and Tobago"], ["TN", {STRING_32} "Tunisia"], ["TR", {STRING_32} "Turkey"], ["TM", {STRING_32} "Turkmenistan"], ["TC", {STRING_32} "Turks and Caicos Islands"], ["TV", {STRING_32} "Tuvalu"], ["UG", {STRING_32} "Uganda"], ["UA", {STRING_32} "Ukraine"], ["AE", {STRING_32} "United Arab Emirates"], - ["GB", {STRING_32} "United Kingdom"], ["US", {STRING_32} "United States"], + ["GB", {STRING_32} "United Kingdom"], ["US", {STRING_32} "United States"], ["UM", {STRING_32} "United States Minor Outlying Islands"], ["UY", {STRING_32} "Uruguay"], ["UZ", {STRING_32} "Uzbekistan"], ["VU", {STRING_32} "Vanuatu"], - ["VE", {STRING_32} "Venezuela, Bolivarian Republic of"], ["VN", {STRING_32} "Viet Nam"], + ["VE", {STRING_32} "Venezuela, Bolivarian Republic of"], ["VN", {STRING_32} "Viet Nam"], ["VG", {STRING_32} "Virgin Islands, British"], ["VI", {STRING_32} "Virgin Islands, U.S."], ["WF", {STRING_32} "Wallis and Futuna"], ["EH", {STRING_32} "Western Sahara"], ["YE", {STRING_32} "Yemen"], diff --git a/draft/library/server/wsf_js_widget/examples/demo/autocompletion/google_autocompletion.e b/draft/library/server/wsf_js_widget/examples/demo/autocompletion/google_autocompletion.e index 76ec5cd0..383c9f39 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/autocompletion/google_autocompletion.e +++ b/draft/library/server/wsf_js_widget/examples/demo/autocompletion/google_autocompletion.e @@ -1,6 +1,5 @@ note description: "Summary description for {GOOGLE_AUTOCOMPLETION}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/base_page.e b/draft/library/server/wsf_js_widget/examples/demo/base_page.e index 672df4f1..33ea23ff 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/base_page.e +++ b/draft/library/server/wsf_js_widget/examples/demo/base_page.e @@ -1,6 +1,5 @@ note description: "Summary description for {BASE_PAGE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/codeview_page.e b/draft/library/server/wsf_js_widget/examples/demo/codeview_page.e index 68b51521..b2ef9849 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/codeview_page.e +++ b/draft/library/server/wsf_js_widget/examples/demo/codeview_page.e @@ -1,6 +1,5 @@ note description: "Summary description for {CODEVIEW_PAGE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news.e b/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news.e index 11386b42..18cc5ce6 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news.e +++ b/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news.e @@ -1,6 +1,5 @@ note description: "Summary description for {GOOGLE_NEWS}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_datasource.e b/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_datasource.e index 78d67454..bcd3094a 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_datasource.e +++ b/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_datasource.e @@ -1,6 +1,5 @@ note description: "Summary description for {GOOGLE_NEWS_DATASOURCE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_repeater.e b/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_repeater.e index b5631025..c3b4813c 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_repeater.e +++ b/draft/library/server/wsf_js_widget/examples/demo/googlenews/google_news_repeater.e @@ -1,6 +1,5 @@ note description: "Summary description for {GOOGLE_NEWS_REPEATER}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/grid_page.e b/draft/library/server/wsf_js_widget/examples/demo/grid_page.e index 124f31ff..09119d67 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/grid_page.e +++ b/draft/library/server/wsf_js_widget/examples/demo/grid_page.e @@ -1,6 +1,5 @@ note description: "Summary description for {GRID_PAGE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/own_validator.e b/draft/library/server/wsf_js_widget/examples/demo/own_validator.e index b0a0b3b9..bb0dda47 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/own_validator.e +++ b/draft/library/server/wsf_js_widget/examples/demo/own_validator.e @@ -1,6 +1,5 @@ note description: "Summary description for {OWN_VALIDATOR}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/progress/increasing_progresssource.e b/draft/library/server/wsf_js_widget/examples/demo/progress/increasing_progresssource.e index 20e1c0b8..33169f2c 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/progress/increasing_progresssource.e +++ b/draft/library/server/wsf_js_widget/examples/demo/progress/increasing_progresssource.e @@ -1,6 +1,5 @@ note description: "Summary description for {INCREASING_PROGRESSSOURCE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/repeater_page.e b/draft/library/server/wsf_js_widget/examples/demo/repeater_page.e index 3af98551..02e88c36 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/repeater_page.e +++ b/draft/library/server/wsf_js_widget/examples/demo/repeater_page.e @@ -1,6 +1,5 @@ note description: "Summary description for {REPEATER_PAGE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/sample_page.e b/draft/library/server/wsf_js_widget/examples/demo/sample_page.e index 1febf1fe..4797b42c 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/sample_page.e +++ b/draft/library/server/wsf_js_widget/examples/demo/sample_page.e @@ -1,6 +1,5 @@ note description: "Summary description for {SAMPLE_PAGE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/slider_page.e b/draft/library/server/wsf_js_widget/examples/demo/slider_page.e index aa3abff5..448aca56 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/slider_page.e +++ b/draft/library/server/wsf_js_widget/examples/demo/slider_page.e @@ -1,6 +1,5 @@ note description: "Summary description for {SLIDER_PAGE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/draft/library/server/wsf_js_widget/examples/demo/upload_page.e b/draft/library/server/wsf_js_widget/examples/demo/upload_page.e index 6c125136..454fdd15 100644 --- a/draft/library/server/wsf_js_widget/examples/demo/upload_page.e +++ b/draft/library/server/wsf_js_widget/examples/demo/upload_page.e @@ -1,6 +1,5 @@ note description: "Summary description for {UPLOAD_PAGE}." - author: "" date: "$Date$" revision: "$Revision$" diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e b/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e index 25b458ab..0b28c038 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e @@ -31,6 +31,8 @@ feature {NONE} -- Initialization end initialize_pool (p: like pool; n: INTEGER) + -- Initialize pool of separate connection handlers. + --| set the pool capacity to n. do p.set_count (n) end @@ -49,6 +51,7 @@ feature -- Access feature {HTTPD_SERVER_I} -- Execution shutdown + -- do if not is_shutdown_requested then is_shutdown_requested := True @@ -57,11 +60,13 @@ feature {HTTPD_SERVER_I} -- Execution end pool_gracefull_stop (p: like pool) + -- Graceful stop pool of separate connection handlers. do p.gracefull_stop end accept_incoming_connection (a_listening_socket: HTTPD_STREAM_SOCKET) + -- do accept_connection_on_pool (pool, a_listening_socket) -- Wait on not pool.is_full or is_stop_requested end @@ -92,6 +97,7 @@ feature {HTTPD_SERVER_I} -- Execution end process_handler (hdl: separate HTTPD_REQUEST_HANDLER) + -- Process request handler `hdl' with exclusive access. require hdl.is_connected do @@ -99,6 +105,7 @@ feature {HTTPD_SERVER_I} -- Execution end separate_client_socket (hdl: separate HTTPD_REQUEST_HANDLER): separate HTTPD_STREAM_SOCKET + -- Separate client socket from a request handler `hdl'. do Result := hdl.client_socket end diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e index 017e2a69..fa89d1fa 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e @@ -79,6 +79,7 @@ feature {NONE} -- Implementation end separate_server_log (a_server: like server; a_message: separate READABLE_STRING_8) + -- Separete log from a server `a_server' with message `a_message'. do a_server.log (a_message) end diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e index bf526b93..67b327cd 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e @@ -1,6 +1,5 @@ note - description: "Summary description for {HTTPD_REQUEST_HANDLER_I}." - author: "" + description: "Represent a handler interface for components that process HTTP requests." date: "$Date$" revision: "$Revision$" @@ -117,13 +116,17 @@ feature -- Status report feature -- Change set_is_verbose (b: BOOLEAN) + -- Set `is_verbose' with `b'. do is_verbose := b + ensure + is_verbose_set: is_verbose = b end feature -- Execution safe_execute + -- Execute incoming request. local retried: BOOLEAN do @@ -194,6 +197,8 @@ feature -- Execution dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + " ENTER") end l_socket.set_timeout (5) -- 5 seconds! + --| TODO: add configuration options for socket timeout. + --| set by default 5 seconds. l_ready_for_reading := l_socket.ready_for_reading if l_ready_for_reading then create l_remote_info @@ -364,11 +369,15 @@ feature -- Output logger: detachable HTTPD_LOGGER set_logger (a_logger: like logger) + -- Set `logger' with `a_logger'. do logger := a_logger + ensure + logger_set: logger = a_logger end log (m: STRING) + -- Log message `m'. do if attached logger as l_logger then l_logger.log (m) diff --git a/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf b/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf index 4bb190b4..d6c14438 100644 --- a/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf +++ b/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf @@ -10,8 +10,12 @@ - - + + + + diff --git a/library/server/wsf/src/wsf_execution.e b/library/server/wsf/src/wsf_execution.e index 79c69336..36d5d7d4 100644 --- a/library/server/wsf/src/wsf_execution.e +++ b/library/server/wsf/src/wsf_execution.e @@ -1,6 +1,5 @@ note - description: "Summary description for {WSF_EXECUTION}." - author: "" + description: "Object that represent a request execution with request and response. " date: "$Date$" revision: "$Revision$" @@ -75,6 +74,7 @@ feature -- Status report feature -- Helpers put_character (c: CHARACTER_8) + -- Send the character `c'. require message_writable: message_writable do @@ -82,6 +82,7 @@ feature -- Helpers end put_string (s: READABLE_STRING_8) + -- Send the string `s'. require message_writable: message_writable do @@ -89,6 +90,7 @@ feature -- Helpers end put_error (err: READABLE_STRING_8) + -- Report error described by `a_message'. require message_writable: message_writable do From 4f9fcf42e217b6a12f998f166ec4e763e985fb93 Mon Sep 17 00:00:00 2001 From: jvelilla Date: Mon, 6 Apr 2015 16:42:45 -0300 Subject: [PATCH 2/5] Added features comments. --- .../configuration/httpd_configuration_i.e | 31 +++++++++++++++++++ .../src/httpd/httpd_request_handler_i.e | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) 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 79b82c83..8d2b9a7b 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 @@ -57,8 +57,10 @@ feature -- Access: SSL -- Is SSL/TLS session?. ca_crt: STRING + -- the signed certificate. ca_key: STRING + -- private key to the sertificate. ssl_protocol: NATURAL -- By default protocol is tls 1.2. @@ -78,31 +80,49 @@ feature -- Element change unset_http_server_name do http_server_name := Void + --| Missing postcondition + --| ensure + --| unser_http_server_name: http_server_name = Void. end set_http_server_port (v: like http_server_port) + -- Set `http_server_port' with `v'. do http_server_port := v + ensure + http_server_port_set: http_server_port = v end set_max_tcp_clients (v: like max_tcp_clients) + -- Set `max_tcp_clients' with `v'. do max_tcp_clients := v + ensure + max_tcp_clients_set: max_tcp_clients = v end set_max_concurrent_connections (v: like max_concurrent_connections) + -- Set `max_concurrent_connections' with `v'. do max_concurrent_connections := v + ensure + max_concurrent_connections_set : max_concurrent_connections = v end set_socket_accept_timeout (v: like socket_accept_timeout) + -- Set `socket_accept_timeout' with `v' do socket_accept_timeout := v + ensure + socket_accept_timeout_set: socket_accept_timeout = v end set_socket_connect_timeout (v: like socket_connect_timeout) + -- Set `socket_connect_timeout' with `v' do socket_connect_timeout := v + ensure + socket_connect_timeout_set: socket_connect_timeout = v end set_force_single_threaded (v: like force_single_threaded) @@ -110,12 +130,17 @@ feature -- Element change if v then set_max_concurrent_connections (0) end + --|Missing postcondition + --| force_single_thread_set: v implies max_concurrent_connections = 0 + --| not_single_thread: not v implies max_concurrent_connections > 0 end set_is_verbose (b: BOOLEAN) -- Set `is_verbose' to `b' do is_verbose := b + ensure + is_verbose_set: is_verbose = b end set_keep_alive_timeout (a_seconds: like keep_alive_timeout) @@ -137,6 +162,12 @@ feature -- Element change else is_secure := False end + --| Missing postcondition + --| ensure + -- is_secure_set : has_ssl_support implies is_secure + -- http_server_port_set: has_ssl_support implies http_server_port = 443 + -- is_not_secure: not has_ssl_support implies not is_secure + -- default_port: not has_ssl_support implies http_server_port = 80 end feature -- Element change diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e index 67b327cd..de42e66f 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e @@ -1,5 +1,5 @@ note - description: "Represent a handler interface for components that process HTTP requests." + description: "Represent a handler interface that process HTTP requests." date: "$Date$" revision: "$Revision$" From d576879b2cb94b1dd2e0094446b8c41b02daed18 Mon Sep 17 00:00:00 2001 From: jvelilla Date: Mon, 6 Apr 2015 17:05:35 -0300 Subject: [PATCH 3/5] Added descriptions and feature comments. --- .../src/implementation/wgi_httpd_request_handler.e | 9 +++++++-- .../implementation/wgi_httpd_request_handler_factory.e | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e b/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e index c9644fec..0ddecd18 100644 --- a/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e +++ b/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e @@ -1,6 +1,8 @@ note - description: "Summary description for {WGI_HTTPD_REQUEST_HANDLER}." - author: "" + description: "[ + WGI implementation of HTTPD_REQUEST_HANDLER, will process the incoming connection + and extract information on the request and the server + ]" date: "$Date$" revision: "$Revision$" @@ -34,8 +36,10 @@ feature {NONE} -- Initialization feature -- Access connector: detachable separate WGI_STANDALONE_CONNECTOR [G] + -- httpd solution. base: detachable IMMUTABLE_STRING_8 + -- Root url base. do if attached connector as conn then if attached connector_base (conn) as l_base then @@ -47,6 +51,7 @@ feature -- Access feature -- SCOOP helpers connector_base (conn: separate WGI_STANDALONE_CONNECTOR [G]): detachable separate READABLE_STRING_8 + -- Rool url based from a connector `conn'. do Result := conn.base end 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 2570bc00..b853eb10 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,6 +1,5 @@ note description: "Summary description for {WGI_HTTPD_REQUEST_HANDLER_FACTORY}." - author: "" date: "$Date$" revision: "$Revision$" @@ -13,10 +12,12 @@ inherit feature -- Access connector: detachable separate WGI_STANDALONE_CONNECTOR [G] + -- httpd solution. feature -- Element change set_connector (conn: like connector) + -- Set `connector' with `conn'. do connector := conn end From 0eb775277254e341a31518f39d280484d4a1054d Mon Sep 17 00:00:00 2001 From: jvelilla Date: Mon, 6 Apr 2015 17:46:59 -0300 Subject: [PATCH 4/5] 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$" From 7dd4da35af8ad6a4efac1af9a526cacfec9780be Mon Sep 17 00:00:00 2001 From: jvelilla Date: Mon, 6 Apr 2015 18:07:35 -0300 Subject: [PATCH 5/5] Added feature comments. Added missing postconditions. --- .../standalone/src/wgi_standalone_server_observer.e | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/server/ewsgi/connectors/standalone/src/wgi_standalone_server_observer.e b/library/server/ewsgi/connectors/standalone/src/wgi_standalone_server_observer.e index 702b8ae8..8684943a 100644 --- a/library/server/ewsgi/connectors/standalone/src/wgi_standalone_server_observer.e +++ b/library/server/ewsgi/connectors/standalone/src/wgi_standalone_server_observer.e @@ -16,12 +16,16 @@ inherit feature -- Access started: BOOLEAN + -- is the server started? stopped: BOOLEAN + -- is the server stoped? terminated: BOOLEAN + -- is the server terminated? port: INTEGER + -- Server listening on port. feature -- Event @@ -29,17 +33,24 @@ feature -- Event do started := True port := a_port + ensure then + started_set: started = True + port_set: port = a_port end on_stopped do stopped := True + ensure then + stopped_set: stopped = True end on_terminated do port := 0 terminated := True + ensure then + terminated_set: terminated = True end note