diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec62deb9..47fcc385 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,14 +7,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
## [Unreleased]
### Added
-- jwt: new JSON Web Token (JWT) library (supports for claim exp, iat, nbf, iss, aud).
+- `jwt`: new JSON Web Token (JWT) library (supports for claim exp, iat, nbf, iss, aud).
+- `http_client`: added support for ciphers setting in the libcurl implementation only.
+- `http_client`: added convenient `get` and `custom` functions on HTTP_CLIENT directly.
+- `websocket`: added `on_timer` solution to allow the server to check for external events and send notification to websocket clients.
### Changed
+- adopted ecf version 1-16-0 and use a single .ecf file (the -safe.ecf are now redirection to normal .ecf)
### Deprecated
+- removed support for Eiffel version before 17.05 .
+- SSL 2 or 3 is obsolete and will raise an exception if used.
### Removed
### Fixed
- Removed a few obsolete calls.
- `http_client`: Added support for multiple file in form data. Made clear what is the meaning of `upload_filename`, `upload_data` and `form_data`.
+- `authentication`: HTTP_AUTHORIZATION acceps now READABLE_STRING_GENERAL for username and password argument.
+- `http_client`: fixed curl implementation by setting `Content-Type` to `x-www-form-urlencoded` (if not set) when POST send data as `x-www-form-urlencoded`.
### Security
diff --git a/README.md b/README.md
index 48b4a22b..c197614d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# Eiffel Web Framework
+[](https://travis-ci.org/EiffelWebFramework/EWF/)
+
## Overview
diff --git a/contrib/library/network/server/nino/example/SimpleWebServer/web_server-safe.ecf b/contrib/library/network/server/nino/example/SimpleWebServer/web_server-safe.ecf
index c2b1849f..289614d5 100644
--- a/contrib/library/network/server/nino/example/SimpleWebServer/web_server-safe.ecf
+++ b/contrib/library/network/server/nino/example/SimpleWebServer/web_server-safe.ecf
@@ -1,22 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /CVS$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/contrib/library/network/server/nino/example/SimpleWebServer/web_server.ecf b/contrib/library/network/server/nino/example/SimpleWebServer/web_server.ecf
index e066115e..4e0dff0b 100644
--- a/contrib/library/network/server/nino/example/SimpleWebServer/web_server.ecf
+++ b/contrib/library/network/server/nino/example/SimpleWebServer/web_server.ecf
@@ -1,17 +1,19 @@
-
-
+
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
+
+
+
diff --git a/contrib/library/network/server/nino/nino-safe.ecf b/contrib/library/network/server/nino/nino-safe.ecf
index 233a68ac..fd148e3f 100644
--- a/contrib/library/network/server/nino/nino-safe.ecf
+++ b/contrib/library/network/server/nino/nino-safe.ecf
@@ -1,34 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /CVS$
- /EIFGENs$
-
-
-
-
-
-
-
-
- spec
-
-
- tcp_stream_socket.e
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/contrib/library/network/server/nino/nino.ecf b/contrib/library/network/server/nino/nino.ecf
index 7af610d1..d3b199ac 100644
--- a/contrib/library/network/server/nino/nino.ecf
+++ b/contrib/library/network/server/nino/nino.ecf
@@ -1,16 +1,16 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
+
+
+
diff --git a/contrib/library/network/server/nino/package.iron b/contrib/library/network/server/nino/package.iron
index 96514dcf..8f03dd5c 100644
--- a/contrib/library/network/server/nino/package.iron
+++ b/contrib/library/network/server/nino/package.iron
@@ -1,7 +1,6 @@
package nino
project
- nino = "nino-safe.ecf"
nino = "nino.ecf"
note
diff --git a/docs/workbook/basics/basics.md b/docs/workbook/basics/basics.md
index 2fc0e40f..f8b41b1b 100644
--- a/docs/workbook/basics/basics.md
+++ b/docs/workbook/basics/basics.md
@@ -59,7 +59,7 @@ feature -- Basic operations
end
```
-When using the "standalone" connector (or the deprecated "nino" connector), by default the service listens on port 80, but often this port is already used by other applications, so it is recommended to use another port.
+When using the [standalone](../connectors/standalone.md) connector (or the deprecated "nino" connector), by default the service listens on port 80, but often this port is already used by other applications, so it is recommended to use another port.
To define another port, redefine the feature `initialize` and set up a new port number using the service options (see below).
@@ -86,6 +86,8 @@ feature {NONE} -- Initialization
end
```
+Learn more about the [Standalone](../connectors/standalone.md) connector.
+
The **WSF_REQUEST** gives access to the incoming data; the class provides features to get information such as request method, form data, query parameters, uploaded files, HTTP request headers, and hostname of the client among others.
The **WSF_RESPONSE** provides features to define the response with information such as HTTP status codes (10x,20x, 30x, 40x, and 50x), response headers (Content-Type, Content-Length, etc.) and obviously the body of the message itself.
diff --git a/docs/workbook/basics/simple/simple.ecf b/docs/workbook/basics/simple/simple.ecf
index e4ff832f..6969354c 100644
--- a/docs/workbook/basics/simple/simple.ecf
+++ b/docs/workbook/basics/simple/simple.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/basics/simple_html/simple_html.ecf b/docs/workbook/basics/simple_html/simple_html.ecf
index 5712125d..90560a02 100644
--- a/docs/workbook/basics/simple_html/simple_html.ecf
+++ b/docs/workbook/basics/simple_html/simple_html.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/connectors/standalone.md b/docs/workbook/connectors/standalone.md
new file mode 100644
index 00000000..4dd0ff46
--- /dev/null
+++ b/docs/workbook/connectors/standalone.md
@@ -0,0 +1,27 @@
+Nav: [Workbook](../workbook.md)
+
+## The EiffelWeb standalone connector
+
+It provides a standalone httpd server for the EiffelWeb framework.
+It implements HTTP/1.1 with persistent connection, concurrent connection, ...
+
+To easily set the standalone connector, see class `WSF_STANDALONE_SERVICE_OPTIONS`.
+
+### Main settings:
+
+* `port`: Listening port number (defaut: 80).
+* `max_concurrent_connections`: maximum of concurrent connections (default: 100)
+* `max_tcp_clients`: Listen on socket for at most `max_tcp_clients` connections (default: 100)
+* `socket_timeout`: Amount of seconds the server waits for receipts and transmissions during communications. With timeout of 0, socket can wait for ever. (default: 60)
+* `socket_recv_timeout`: Amount of seconds the server waits for receiving data during communications. With timeout of 0, socket can waits for ever. (default: 5)
+* `keep_alive_timeout`: Persistent connection timeout. Number of seconds the server waits after a request has been served before it closes the connection (default: 5)
+* `max_keep_alive_requests`: Maximum number of requests allowed per persistent connection. To disable KeepAlive, set `max_keep_alive_requests` to `0`. To have no limit, set `max_keep_alive_requests` to `-1` (default: 300).
+
+* `is_secure`: check SSL certificate?
+* `secure_certificate`: path to SSL certificate.
+* `secure_certificate_key`: certificate key
+
+* `verbose`: display verbose output (Default: false)
+
+See also `WGI_STANDALONE_CONSTANTS` for default values.
+
diff --git a/docs/workbook/generating_response/exel/exel.ecf b/docs/workbook/generating_response/exel/exel.ecf
index e16eb9f7..1de3d559 100644
--- a/docs/workbook/generating_response/exel/exel.ecf
+++ b/docs/workbook/generating_response/exel/exel.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/generating_response/headers/headers.ecf b/docs/workbook/generating_response/headers/headers.ecf
index 797eb842..aa454c97 100644
--- a/docs/workbook/generating_response/headers/headers.ecf
+++ b/docs/workbook/generating_response/headers/headers.ecf
@@ -1,40 +1,49 @@
-
+
- /EIFGENs$
+ /\.svn$
/CVS$
- /.svn$
+ /EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/generating_response/search/search.ecf b/docs/workbook/generating_response/search/search.ecf
index 7c42d50b..e2726610 100644
--- a/docs/workbook/generating_response/search/search.ecf
+++ b/docs/workbook/generating_response/search/search.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/generating_response/status/status.ecf b/docs/workbook/generating_response/status/status.ecf
index de47b96a..3ef042b8 100644
--- a/docs/workbook/generating_response/status/status.ecf
+++ b/docs/workbook/generating_response/status/status.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/handling_cookies/example/example.ecf b/docs/workbook/handling_cookies/example/example.ecf
index dea25001..392f5e5a 100644
--- a/docs/workbook/handling_cookies/example/example.ecf
+++ b/docs/workbook/handling_cookies/example/example.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/handling_request/form/get/form.ecf b/docs/workbook/handling_request/form/get/form.ecf
index 8dde5e4d..bc6d5f4d 100644
--- a/docs/workbook/handling_request/form/get/form.ecf
+++ b/docs/workbook/handling_request/form/get/form.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/handling_request/form/post/form.ecf b/docs/workbook/handling_request/form/post/form.ecf
index bd83b4bd..7896ff19 100644
--- a/docs/workbook/handling_request/form/post/form.ecf
+++ b/docs/workbook/handling_request/form/post/form.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/handling_request/headers/browser_name/browsers.ecf b/docs/workbook/handling_request/headers/browser_name/browsers.ecf
index bb1df575..dbd46d58 100644
--- a/docs/workbook/handling_request/headers/browser_name/browsers.ecf
+++ b/docs/workbook/handling_request/headers/browser_name/browsers.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/handling_request/headers/cgi_variables/cgi_variables.ecf b/docs/workbook/handling_request/headers/cgi_variables/cgi_variables.ecf
index 8ba57e16..dd7143e3 100644
--- a/docs/workbook/handling_request/headers/cgi_variables/cgi_variables.ecf
+++ b/docs/workbook/handling_request/headers/cgi_variables/cgi_variables.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/handling_request/headers/header_fields/header_fields.ecf b/docs/workbook/handling_request/headers/header_fields/header_fields.ecf
index 39e2f8a0..75398bab 100644
--- a/docs/workbook/handling_request/headers/header_fields/header_fields.ecf
+++ b/docs/workbook/handling_request/headers/header_fields/header_fields.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/docs/workbook/handling_request/upload_file/upload.ecf b/docs/workbook/handling_request/upload_file/upload.ecf
index 0722e151..5b80a461 100644
--- a/docs/workbook/handling_request/upload_file/upload.ecf
+++ b/docs/workbook/handling_request/upload_file/upload.ecf
@@ -1,40 +1,49 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/draft/library/protocol/syndication/atom/atom-safe.ecf b/draft/library/protocol/syndication/atom/atom-safe.ecf
index 4af20c64..7df38e2e 100644
--- a/draft/library/protocol/syndication/atom/atom-safe.ecf
+++ b/draft/library/protocol/syndication/atom/atom-safe.ecf
@@ -1,16 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
+
+
diff --git a/draft/library/protocol/syndication/atom/atom.ecf b/draft/library/protocol/syndication/atom/atom.ecf
index c5805e0f..17e504b6 100644
--- a/draft/library/protocol/syndication/atom/atom.ecf
+++ b/draft/library/protocol/syndication/atom/atom.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/draft/library/protocol/syndication/rss/rss-safe.ecf b/draft/library/protocol/syndication/rss/rss-safe.ecf
index 83620c87..9b7b63a9 100644
--- a/draft/library/protocol/syndication/rss/rss-safe.ecf
+++ b/draft/library/protocol/syndication/rss/rss-safe.ecf
@@ -1,16 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
+
+
diff --git a/draft/library/protocol/syndication/rss/rss.ecf b/draft/library/protocol/syndication/rss/rss.ecf
index e039a0df..1f90cd51 100644
--- a/draft/library/protocol/syndication/rss/rss.ecf
+++ b/draft/library/protocol/syndication/rss/rss.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/draft/library/security/oauth/oauth-safe.ecf b/draft/library/security/oauth/oauth-safe.ecf
index f01b254a..62eba3dd 100644
--- a/draft/library/security/oauth/oauth-safe.ecf
+++ b/draft/library/security/oauth/oauth-safe.ecf
@@ -1,16 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
+
+
diff --git a/draft/library/security/oauth/oauth.ecf b/draft/library/security/oauth/oauth.ecf
index 8550c8d4..fe5ce27f 100644
--- a/draft/library/security/oauth/oauth.ecf
+++ b/draft/library/security/oauth/oauth.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/draft/library/server/wsf_js_widget/examples/custom-template/js_widget_template.ecf b/draft/library/server/wsf_js_widget/examples/custom-template/js_widget_template.ecf
index 04cb2f1a..0ebbc126 100644
--- a/draft/library/server/wsf_js_widget/examples/custom-template/js_widget_template.ecf
+++ b/draft/library/server/wsf_js_widget/examples/custom-template/js_widget_template.ecf
@@ -1,33 +1,32 @@
-
+
- /.git$
+ /\.git$
/CVS$
/EIFGENs$
-
-
-
-
-
-
+
+
+
+
-
+
-
+
-
+
diff --git a/draft/library/server/wsf_js_widget/examples/custom/js_widget_custom.ecf b/draft/library/server/wsf_js_widget/examples/custom/js_widget_custom.ecf
index 58a8446a..46b01a28 100644
--- a/draft/library/server/wsf_js_widget/examples/custom/js_widget_custom.ecf
+++ b/draft/library/server/wsf_js_widget/examples/custom/js_widget_custom.ecf
@@ -1,33 +1,32 @@
-
+
- /.git$
+ /\.git$
/CVS$
/EIFGENs$
-
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
diff --git a/draft/library/server/wsf_js_widget/examples/demo/demo.ecf b/draft/library/server/wsf_js_widget/examples/demo/demo.ecf
index 0946ac0d..be5a8ee8 100644
--- a/draft/library/server/wsf_js_widget/examples/demo/demo.ecf
+++ b/draft/library/server/wsf_js_widget/examples/demo/demo.ecf
@@ -1,44 +1,52 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
diff --git a/draft/library/server/wsf_js_widget/wsf_js_widget-safe.ecf b/draft/library/server/wsf_js_widget/wsf_js_widget-safe.ecf
index f4239f00..efc5a4a2 100644
--- a/draft/library/server/wsf_js_widget/wsf_js_widget-safe.ecf
+++ b/draft/library/server/wsf_js_widget/wsf_js_widget-safe.ecf
@@ -1,21 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/draft/library/server/wsf_js_widget/wsf_js_widget.ecf b/draft/library/server/wsf_js_widget/wsf_js_widget.ecf
index 8b1afe1f..22d11934 100644
--- a/draft/library/server/wsf_js_widget/wsf_js_widget.ecf
+++ b/draft/library/server/wsf_js_widget/wsf_js_widget.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/draft/src/gewf/gewf.ecf b/draft/src/gewf/gewf.ecf
index 104e7e13..3524f370 100644
--- a/draft/src/gewf/gewf.ecf
+++ b/draft/src/gewf/gewf.ecf
@@ -1,22 +1,21 @@
-
+
Generator for EWF project
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
-
-
-
-
+
+
+
+
diff --git a/draft/src/gewf/src/gewf_generator.e b/draft/src/gewf/src/gewf_generator.e
index 389c606e..df81398d 100644
--- a/draft/src/gewf/src/gewf_generator.e
+++ b/draft/src/gewf/src/gewf_generator.e
@@ -113,14 +113,13 @@ feature -- Implementation
across
l_values as c
loop
- s.replace_substring_all ({STRING_32} "${" + c.key.as_string_32 + "}", c.item)
+ s.replace_substring_all ({STRING_32} "${" + c.key.to_string_32 + "}", c.item.to_string_32)
end
end
end
-
note
- copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
+ copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
diff --git a/examples/_update_needed/filter/filter.ecf b/examples/_update_needed/filter/filter.ecf
index 8fc170e0..30112b5c 100644
--- a/examples/_update_needed/filter/filter.ecf
+++ b/examples/_update_needed/filter/filter.ecf
@@ -1,33 +1,34 @@
-
+
/EIFGENs$
/\.git$
/\.svn$
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
diff --git a/examples/debug/debug.ecf b/examples/debug/debug.ecf
index 7bbda930..3365d92b 100644
--- a/examples/debug/debug.ecf
+++ b/examples/debug/debug.ecf
@@ -1,47 +1,44 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
-
-
+
-
+
-
+
diff --git a/examples/desktop_app/desktop_app.ecf b/examples/desktop_app/desktop_app.ecf
index df08bef2..32bd16df 100644
--- a/examples/desktop_app/desktop_app.ecf
+++ b/examples/desktop_app/desktop_app.ecf
@@ -1,23 +1,22 @@
-
+
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.
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
diff --git a/examples/form/form.ecf b/examples/form/form.ecf
index 59c01c12..1c912357 100644
--- a/examples/form/form.ecf
+++ b/examples/form/form.ecf
@@ -1,52 +1,54 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
-
+
+
+
-
+
+
+
-
-
+
-
-
+
diff --git a/examples/obsolete/v0/filter/filter-safe.ecf b/examples/obsolete/v0/filter/filter.ecf
similarity index 56%
rename from examples/obsolete/v0/filter/filter-safe.ecf
rename to examples/obsolete/v0/filter/filter.ecf
index 5e872262..5b26d48d 100644
--- a/examples/obsolete/v0/filter/filter-safe.ecf
+++ b/examples/obsolete/v0/filter/filter.ecf
@@ -1,35 +1,41 @@
-
+
/EIFGENs$
/\.git$
/\.svn$
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
-
-
diff --git a/examples/obsolete/v0/restbucksCRUD/client/client-safe.ecf b/examples/obsolete/v0/restbucksCRUD/client/client-safe.ecf
deleted file mode 100644
index dc8c3362..00000000
--- a/examples/obsolete/v0/restbucksCRUD/client/client-safe.ecf
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/obsolete/v0/restbucksCRUD/client/client.ecf b/examples/obsolete/v0/restbucksCRUD/client/client.ecf
index 3e2cc430..f60278f9 100644
--- a/examples/obsolete/v0/restbucksCRUD/client/client.ecf
+++ b/examples/obsolete/v0/restbucksCRUD/client/client.ecf
@@ -1,17 +1,20 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
+
+
+
+
-
+
diff --git a/examples/obsolete/v0/restbucksCRUD/restbucks-safe.ecf b/examples/obsolete/v0/restbucksCRUD/restbucks.ecf
similarity index 62%
rename from examples/obsolete/v0/restbucksCRUD/restbucks-safe.ecf
rename to examples/obsolete/v0/restbucksCRUD/restbucks.ecf
index a661a6be..486593f8 100644
--- a/examples/obsolete/v0/restbucksCRUD/restbucks-safe.ecf
+++ b/examples/obsolete/v0/restbucksCRUD/restbucks.ecf
@@ -1,35 +1,35 @@
-
-
+
+
/EIFGENs$
/\.git$
/\.svn$
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
@@ -41,11 +41,11 @@
-
-
+
/resource$
diff --git a/examples/proxy/proxy.ecf b/examples/proxy/proxy.ecf
index 9907d2c7..60078dd8 100644
--- a/examples/proxy/proxy.ecf
+++ b/examples/proxy/proxy.ecf
@@ -1,29 +1,27 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
-
+
+
+
+
-
-
-
+
diff --git a/examples/rest/restbucks_CRUD/client/client.ecf b/examples/rest/restbucks_CRUD/client/client.ecf
index 3314de3e..68c37214 100644
--- a/examples/rest/restbucks_CRUD/client/client.ecf
+++ b/examples/rest/restbucks_CRUD/client/client.ecf
@@ -1,19 +1,18 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
-
-
-
+
+
+
diff --git a/examples/rest/restbucks_CRUD/restbucks.ecf b/examples/rest/restbucks_CRUD/restbucks.ecf
index a4a5b870..d755f5f2 100644
--- a/examples/rest/restbucks_CRUD/restbucks.ecf
+++ b/examples/rest/restbucks_CRUD/restbucks.ecf
@@ -1,33 +1,29 @@
-
+
/EIFGENs$
/\.git$
/\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -38,11 +34,10 @@
-
-
+
/resource/order_handler.e$
diff --git a/examples/rest/restbucks_CRUD/support/simple_db/simple_db-safe.ecf b/examples/rest/restbucks_CRUD/support/simple_db/simple_db-safe.ecf
index f0ac5ee5..6f5f13b5 100644
--- a/examples/rest/restbucks_CRUD/support/simple_db/simple_db-safe.ecf
+++ b/examples/rest/restbucks_CRUD/support/simple_db/simple_db-safe.ecf
@@ -1,25 +1,3 @@
-
-
-
-
-
-
-
-
-
- /.*json.*\.e$
-
-
-
-
-
- /basic_memory_database\.e$
-
-
-
-
-
-
-
+
+
diff --git a/examples/rest/restbucks_CRUD/support/simple_db/simple_db.ecf b/examples/rest/restbucks_CRUD/support/simple_db/simple_db.ecf
index f46af389..dfab8053 100644
--- a/examples/rest/restbucks_CRUD/support/simple_db/simple_db.ecf
+++ b/examples/rest/restbucks_CRUD/support/simple_db/simple_db.ecf
@@ -1,10 +1,9 @@
-
+
-
-
diff --git a/examples/rest/restbucks_CRUD/support/simple_db/tests/test_simple_db.ecf b/examples/rest/restbucks_CRUD/support/simple_db/tests/test_simple_db.ecf
index 029db293..92229cb2 100644
--- a/examples/rest/restbucks_CRUD/support/simple_db/tests/test_simple_db.ecf
+++ b/examples/rest/restbucks_CRUD/support/simple_db/tests/test_simple_db.ecf
@@ -1,19 +1,18 @@
-
+
-
- /\.svn$
- /\.git$
- /EIFGENs$
-
-
-
-
-
-
-
+
+
+
+
/.*json.*\.e$
@@ -30,7 +29,8 @@
-
+
+
+
-
diff --git a/examples/simple/simple.ecf b/examples/simple/simple.ecf
index 69b4f647..2ed26bf1 100644
--- a/examples/simple/simple.ecf
+++ b/examples/simple/simple.ecf
@@ -1,50 +1,51 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
+
+
+
-
-
-
+
-
+
+
+
-
+
+
+
-
-
+
-
-
+
diff --git a/examples/simple/simple.ini b/examples/simple/simple.ini
index 33266fcd..017186a2 100644
--- a/examples/simple/simple.ini
+++ b/examples/simple/simple.ini
@@ -2,8 +2,8 @@ verbose=true
verbose_level=ALERT
port=9090
#max_concurrent_connections=100
-keep_alive_timeout=3
-#max_tcp_clients=100
-socket_timeout=60
-socket_recv_timeout=15
+#keep_alive_timeout=5
#max_keep_alive_requests=300
+#max_tcp_clients=100
+#socket_timeout=60
+#socket_recv_timeout=15
diff --git a/examples/simple_file/service_file.ecf b/examples/simple_file/service_file.ecf
index ebce8652..8a7c9c46 100644
--- a/examples/simple_file/service_file.ecf
+++ b/examples/simple_file/service_file.ecf
@@ -1,18 +1,17 @@
-
+
-
-
-
-
-
-
+
+
+
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
diff --git a/examples/simple_ssl/simple_ssl.ecf b/examples/simple_ssl/simple_ssl.ecf
index 480afec5..e8de6d51 100644
--- a/examples/simple_ssl/simple_ssl.ecf
+++ b/examples/simple_ssl/simple_ssl.ecf
@@ -1,27 +1,27 @@
-
+
Simple EiffelWeb standalone server with SSL support (Concurrent connection supported thanks to SCOOP).
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
-
+
+
+
+
Simple EiffelWeb standalone server with SSL support (Single threaded, thus no concurrent connection.)
-
+
+
+
diff --git a/examples/simple_ssl/test/test.e b/examples/simple_ssl/test/test.e
new file mode 100644
index 00000000..595354db
--- /dev/null
+++ b/examples/simple_ssl/test/test.e
@@ -0,0 +1,44 @@
+note
+ description: "[
+ Enter class description here!
+ ]"
+
+class
+ TEST
+
+create
+ make
+
+feature {NONE} -- Initialization
+
+ make
+ -- Instantiate Current object.
+ do
+ execute
+ end
+
+feature -- Execution
+
+ execute
+ local
+ l_socket: NETWORK_STREAM_SOCKET
+ l_packet: PACKET
+ do
+ create l_socket.make_client_by_port(9090, "localhost")
+ l_socket.connect
+
+ create l_packet.make(1)
+ l_packet.put_element('a', 0)
+
+ l_socket.send(l_packet, 0)
+
+ from
+
+ until
+ not l_socket.is_connected
+ loop
+
+ end
+ end
+
+end
diff --git a/examples/tutorial/step_2/hello/alternatives/launcher/hello_with_launcher.ecf b/examples/tutorial/step_2/hello/alternatives/launcher/hello_with_launcher.ecf
index 4f0039cb..c29cff20 100644
--- a/examples/tutorial/step_2/hello/alternatives/launcher/hello_with_launcher.ecf
+++ b/examples/tutorial/step_2/hello/alternatives/launcher/hello_with_launcher.ecf
@@ -1,19 +1,18 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
+
+
+
diff --git a/examples/tutorial/step_2/hello/alternatives/message/hello_with_execute.ecf b/examples/tutorial/step_2/hello/alternatives/message/hello_with_execute.ecf
index 0783b1c5..4b5e9134 100644
--- a/examples/tutorial/step_2/hello/alternatives/message/hello_with_execute.ecf
+++ b/examples/tutorial/step_2/hello/alternatives/message/hello_with_execute.ecf
@@ -1,19 +1,18 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
+
+
+
diff --git a/examples/tutorial/step_2/hello/hello.ecf b/examples/tutorial/step_2/hello/hello.ecf
index 951cb803..0fa2b569 100644
--- a/examples/tutorial/step_2/hello/hello.ecf
+++ b/examples/tutorial/step_2/hello/hello.ecf
@@ -1,37 +1,38 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
+
+
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
+
+
+
-
-
-
+
+
+
diff --git a/examples/tutorial/step_3/hello/hello.ecf b/examples/tutorial/step_3/hello/hello.ecf
index e5d78703..6533a1d8 100644
--- a/examples/tutorial/step_3/hello/hello.ecf
+++ b/examples/tutorial/step_3/hello/hello.ecf
@@ -1,20 +1,19 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
+
+
+
diff --git a/examples/tutorial/step_4/hello/hello.ecf b/examples/tutorial/step_4/hello/hello.ecf
index 23b128c7..360638da 100644
--- a/examples/tutorial/step_4/hello/hello.ecf
+++ b/examples/tutorial/step_4/hello/hello.ecf
@@ -1,21 +1,20 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/examples/upload_image/upload_image.ecf b/examples/upload_image/upload_image.ecf
index 322ba3ce..4bdcdeba 100644
--- a/examples/upload_image/upload_image.ecf
+++ b/examples/upload_image/upload_image.ecf
@@ -1,38 +1,37 @@
-
+
/EIFGENs$
/\.git$
/\.svn$
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
+
+
+
-
-
+
+
+
+
-
-
-
diff --git a/examples/websocket/application_execution.e b/examples/websocket/application_execution.e
index 506bbedf..295411bd 100644
--- a/examples/websocket/application_execution.e
+++ b/examples/websocket/application_execution.e
@@ -10,6 +10,9 @@ inherit
WSF_WEBSOCKET_EXECUTION
WEB_SOCKET_EVENT_I
+ redefine
+ on_timer
+ end
create
make
@@ -52,6 +55,9 @@ feature -- Websocket execution
on_open (ws: WEB_SOCKET)
do
+ initialize_commands
+ set_timer_delay (1) -- Every 1 second.
+
ws.put_error ("Connecting")
ws.send (Text_frame, "Hello, this is a simple demo with Websocket using Eiffel. (/help for more information).%N")
end
@@ -62,12 +68,26 @@ feature -- Websocket execution
end
on_text (ws: WEB_SOCKET; a_message: READABLE_STRING_8)
+ local
+ i: INTEGER
+ cmd_name: READABLE_STRING_8
do
- if a_message.same_string_general ("/help") then
- -- Echo the message for testing.
- ws.send (Text_frame, "Help: available commands%N - /time : return the server UTC time.%N")
- elseif a_message.starts_with_general ("/time") then
- ws.send (Text_frame, "Server time is " + (create {HTTP_DATE}.make_now_utc).string)
+ if a_message.starts_with_general ("/") then
+ from
+ i := 1
+ until
+ i >= a_message.count or else a_message[i + 1].is_space
+ loop
+ i := i + 1
+ end
+ cmd_name := a_message.substring (2, i)
+ if attached command (cmd_name) as cmd then
+ cmd (ws, a_message.substring (i + 1, a_message.count))
+ elseif a_message.same_string_general ("/help") then
+ on_help_command (ws, Void)
+ else
+ ws.send (Text_frame, "Error: unknown command '/" + cmd_name + "'!%N")
+ end
else
-- Echo the message for testing.
ws.send (Text_frame, a_message)
@@ -80,6 +100,88 @@ feature -- Websocket execution
ws.put_error ("Connection closed")
end
+ on_timer (ws: WEB_SOCKET)
+ -- .
+ -- If ever the file ".stop" exists, stop gracefully the connection.
+ local
+ fut: FILE_UTILITIES
+ f: RAW_FILE
+ do
+ if fut.file_exists (".stop") then
+ ws.send_text ("End of the communication ...%N")
+ ws.send_connection_close ("")
+ create f.make_with_name (".stop")
+ f.delete
+ end
+ end
+
+feature -- Command
+
+ initialize_commands
+ do
+ register_command (agent on_help_command, "help", "Display this help.")
+ register_command (agent on_time_command, "time", "Return the server UTC time.")
+ register_command (agent on_shutdown_command, "shutdown", "Shutdown the service (ends the websocket).")
+ end
+
+ register_command (a_cmd: attached like command; a_name: READABLE_STRING_8; a_description: READABLE_STRING_8)
+ local
+ tb: like commands
+ do
+ tb := commands
+ if tb = Void then
+ create tb.make_caseless (1)
+ commands := tb
+ end
+ tb.force ([a_cmd, a_name, a_description], a_name)
+ end
+
+ commands: detachable STRING_TABLE [TUPLE [cmd: attached like command; name, description: READABLE_STRING_8]]
+
+ command (a_name: READABLE_STRING_GENERAL): detachable PROCEDURE [TUPLE [ws: WEB_SOCKET; args: detachable READABLE_STRING_GENERAL]]
+ do
+ if
+ attached commands as tb and then
+ attached tb.item (a_name) as d
+ then
+ Result := d.cmd
+ end
+ end
+
+ on_help_command (ws: WEB_SOCKET; args: detachable READABLE_STRING_GENERAL)
+ local
+ s: STRING
+ do
+ create s.make_from_string ("Help: available commands:%N")
+ if attached commands as tb then
+ across
+ tb as ic
+ loop
+ s.append (" /")
+ s.append (ic.item.name)
+ s.append (" : ")
+ s.append (ic.item.description)
+ s.append ("%N")
+ end
+ end
+ ws.send_text (s)
+ end
+
+ on_time_command (ws: WEB_SOCKET; args: detachable READABLE_STRING_GENERAL)
+ do
+ ws.send_text ("Server time is " + (create {HTTP_DATE}.make_now_utc).string)
+ end
+
+ on_shutdown_command (ws: WEB_SOCKET; args: detachable READABLE_STRING_GENERAL)
+ local
+ f: RAW_FILE
+ do
+ ws.send_text ("Active websockets will end soon.%N")
+ create f.make_create_read_write (".stop")
+ f.put_string ("stop%N")
+ f.close
+ end
+
feature -- HTML Resource
websocket_app_html (a_port: INTEGER): STRING
@@ -188,5 +290,4 @@ body {font-family:Arial, Helvetica, sans-serif;}
end
end
-
end
diff --git a/examples/websocket/websocket_app.ecf b/examples/websocket/websocket_app.ecf
index 0718f32a..6126f6cb 100644
--- a/examples/websocket/websocket_app.ecf
+++ b/examples/websocket/websocket_app.ecf
@@ -1,23 +1,30 @@
-
+
- /.svn$
/CVS$
/EIFGENs$
+ /\.svn$
-
-
-
-
-
-
+
+
+
+
+
+ Single thread solution.
+ Warning: as it can not handle concurrent request, it is recommended to set Keep-Alive-Timeout to very low value, as browser will keep persistent connection open too long.
+
+
+
+
+
diff --git a/examples/websocket/ws.ini b/examples/websocket/ws.ini
index 29179920..87dcb630 100644
--- a/examples/websocket/ws.ini
+++ b/examples/websocket/ws.ini
@@ -1,13 +1,20 @@
-verbose=true
-verbose_level=INFORMATION
port=9090
+
+#Socket and timeout
max_concurrent_connections=100
-keep_alive_timeout=35
max_tcp_clients=100
socket_timeout=30
socket_recv_timeout=5
-max_keep_alive_requests=300
+#Persistent connections
+keep_alive_timeout=2
+max_keep_alive_requests=-1
+
+#SSL
is_secure=false
secure_certificate=ca.crt
secure_certificate_key=ca.key
+
+#Debug
+verbose=true
+verbose_level=INFORMATION
diff --git a/library/network/http_client/README.md b/library/network/http_client/README.md
index 288ad58d..26d18b85 100644
--- a/library/network/http_client/README.md
+++ b/library/network/http_client/README.md
@@ -10,6 +10,9 @@ It provides simple routine to perform http requests, and get response.
- Eiffel Net library
- and optionally Eiffel NetSSL library to support `https://...`
+* Note: set ciphers setting is supported only with libcurl implementation for now, net implementation
+set all the ciphers as part of the OpenSSL initialization.
+
This means on Windows, do not forget to copy the libcurl.dll (and related) either in the same directory of the executable, or ensure the .dll are in the PATH environment.
It is possible to exclude the libcurl implementation xor the Eiffel Net implementation:
diff --git a/library/network/http_client/http_client-safe.ecf b/library/network/http_client/http_client-safe.ecf
index 05a0e1c5..2f35b985 100644
--- a/library/network/http_client/http_client-safe.ecf
+++ b/library/network/http_client/http_client-safe.ecf
@@ -1,80 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/network/http_client/http_client.ecf b/library/network/http_client/http_client.ecf
index 2a10f2d4..58aee379 100644
--- a/library/network/http_client/http_client.ecf
+++ b/library/network/http_client/http_client.ecf
@@ -1,15 +1,12 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
@@ -33,8 +30,8 @@
-
-
+
+
diff --git a/library/network/http_client/libcurl_http_client-safe.ecf b/library/network/http_client/libcurl_http_client-safe.ecf
index 4357f834..4cd298a1 100644
--- a/library/network/http_client/libcurl_http_client-safe.ecf
+++ b/library/network/http_client/libcurl_http_client-safe.ecf
@@ -1,26 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/network/http_client/libcurl_http_client.ecf b/library/network/http_client/libcurl_http_client.ecf
index 8ad508ab..b3eaee60 100644
--- a/library/network/http_client/libcurl_http_client.ecf
+++ b/library/network/http_client/libcurl_http_client.ecf
@@ -1,15 +1,12 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
@@ -17,8 +14,8 @@
-
-
+
+
diff --git a/library/network/http_client/net_http_client-safe.ecf b/library/network/http_client/net_http_client-safe.ecf
index 544b0c73..007a6d29 100644
--- a/library/network/http_client/net_http_client-safe.ecf
+++ b/library/network/http_client/net_http_client-safe.ecf
@@ -1,37 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/network/http_client/net_http_client.ecf b/library/network/http_client/net_http_client.ecf
index 5276d4ce..9c8d96dd 100644
--- a/library/network/http_client/net_http_client.ecf
+++ b/library/network/http_client/net_http_client.ecf
@@ -1,15 +1,12 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
@@ -26,8 +23,8 @@
-
-
+
+
diff --git a/library/network/http_client/package.iron b/library/network/http_client/package.iron
index d0035f8b..46b23ee3 100644
--- a/library/network/http_client/package.iron
+++ b/library/network/http_client/package.iron
@@ -1,22 +1,20 @@
package http_client
project
- http_client = "http_client-safe.ecf"
http_client = "http_client.ecf"
- libcurl_http_client = "libcurl_http_client-safe.ecf"
libcurl_http_client = "libcurl_http_client.ecf"
- net_http_client = "net_http_client-safe.ecf"
net_http_client = "net_http_client.ecf"
note
title: HTTP client
- description: "[
- Provides simple routines to perform http requests, and get associated response.
- It has two implementations:
- - using Eiffel cURL (i.e libcurl)
- - using EiffelNET (and the EiffelNET SSL extension)
- ]"
- collection:EWF
+ description: "[
+Provides simple routines to perform http requests, and get associated response.
+It has two implementations:
+ - using Eiffel cURL (i.e libcurl)
+ - using EiffelNET (and the EiffelNET SSL extension)
+ ]"
+
+ collection: EWF
tags: http,client,network,request,web,curl,EWF
copyright: 1984-2016 Eiffel Software and others
license: Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)
diff --git a/library/network/http_client/src/http_client_request.e b/library/network/http_client/src/http_client_request.e
index 087484d9..c2217bf2 100644
--- a/library/network/http_client/src/http_client_request.e
+++ b/library/network/http_client/src/http_client_request.e
@@ -30,8 +30,19 @@ feature {NONE} -- Initialization
-- Initialize Current with `a_url' and `ctx'.
-- This can be used to reset/reinitialize Current with new url
-- in the case of redirection.
+ local
+ i: INTEGER
do
- url := a_url
+ i := a_url.substring_index ("://", 1)
+ if i > 0 then
+ check
+ a_url.substring (1, i).same_string ("http")
+ or a_url.substring (1, i).same_string ("https")
+ end
+ url := a_url
+ else
+ url := session.url (a_url, Void)
+ end
headers := session.headers.twin
if ctx /= Void then
context := ctx
diff --git a/library/network/http_client/src/http_client_session.e b/library/network/http_client/src/http_client_session.e
index 5272173e..e0b469dc 100644
--- a/library/network/http_client/src/http_client_session.e
+++ b/library/network/http_client/src/http_client_session.e
@@ -272,6 +272,14 @@ feature -- Authentication
-- Associated optional credentials value.
-- Computed as `username':`password'.
+ ciphers_setting: detachable READABLE_STRING_8
+ -- SSL cipher preference lists
+ -- examples: DEFAULT, ALL, TLSv1
+ -- check https://www.openssl.org/docs/man1.1.0/apps/ciphers.html
+ -- Warning: At the moment only used for LIB_CURL_HTTP_CLIENT
+ -- Net implementation set all the ciphers using the OpenSSL at
+ -- initialization time.
+
feature -- Status setting
set_is_debug (b: BOOLEAN)
@@ -401,6 +409,14 @@ feature -- Element change
chunk_size := a_size
end
+ set_ciphers_setting (a_ciphers_setting: READABLE_STRING_8)
+ -- Set 'ciphers_setting' with 'a_ciphers_setting'.
+ do
+ create {STRING_8} ciphers_setting.make_from_string (a_ciphers_setting)
+ ensure
+ ciphers_setting_set: attached ciphers_setting as c_setting and then c_setting.same_string (a_ciphers_setting)
+ end
+
note
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
diff --git a/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e b/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e
index 13e44bbb..4c540501 100644
--- a/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e
+++ b/library/network/http_client/src/spec/libcurl/libcurl_http_client_request.e
@@ -206,7 +206,10 @@ feature -- Execution
l_use_curl_form := True
end
else
+ l_headers.force ("application/x-www-form-urlencoded", "Content-Type")
l_upload_data := ctx.form_parameters_to_x_www_form_url_encoded_string
+ curl_easy.setopt_string (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_postfields, l_upload_data)
+ curl_easy.setopt_integer (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_postfieldsize, l_upload_data.count)
end
if l_use_curl_form then
create l_form.make
@@ -372,6 +375,11 @@ feature -- Execution
curl_easy.setopt_integer (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_ssl_verifypeer, 0)
end
+ --| Cipher List
+ if attached session.ciphers_setting as c_list then
+ curl_easy.setopt_string (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_ssl_cipher_list, c_list )
+ end
+
--| Request method
if request_method.is_case_insensitive_equal ("GET") then
curl_easy.setopt_integer (curl_handle, {CURL_OPT_CONSTANTS}.curlopt_httpget, 1)
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 3c00f138..cbc457c0 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
@@ -113,6 +113,7 @@ feature -- Access
-- Get URL data
l_is_https := url.starts_with_general ("https://")
create l_uri.make_from_string (url)
+ check valid_url: l_uri.is_valid end
l_port := l_uri.port
if l_port = 0 then
if l_is_https then
diff --git a/library/network/http_client/tests/test.ecf b/library/network/http_client/tests/test.ecf
index 49622c2a..e15b06de 100644
--- a/library/network/http_client/tests/test.ecf
+++ b/library/network/http_client/tests/test.ecf
@@ -1,26 +1,29 @@
-
-
+
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
+
+
+
-
-
+
+
-
+
.*libcurl_.*.e$
diff --git a/library/network/http_network/http_network-safe.ecf b/library/network/http_network/http_network-safe.ecf
index a4d43db7..4d5d09f5 100644
--- a/library/network/http_network/http_network-safe.ecf
+++ b/library/network/http_network/http_network-safe.ecf
@@ -1,126 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /http_stream_socket_ext.e$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /http_stream_secure_socket_ext.e$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/network/http_network/http_network.ecf b/library/network/http_network/http_network.ecf
index f26e44c5..d6b4e52c 100644
--- a/library/network/http_network/http_network.ecf
+++ b/library/network/http_network/http_network.ecf
@@ -1,124 +1,38 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+
+
-
- /http_stream_socket_ext.e$
-
-
-
-
-
-
-
-
-
-
-
-
-
- /http_stream_secure_socket_ext.e$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/network/http_network/spec/include_until_16_05/ew_network.h b/library/network/http_network/spec/include_until_16_05/ew_network.h
deleted file mode 100644
index 0313fbae..00000000
--- a/library/network/http_network/spec/include_until_16_05/ew_network.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-indexing
- description: "Functions used by the EiffelWeb http networking classes. "
- copyright: "Copyright (c) 2011-2016, Jocelyn Fiat, Eiffel Software and others"
- license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
- source: "[
- Eiffel Software
- 5949 Hollister Ave., Goleta, CA 93117 USA
- Telephone 805-685-1006, Fax 805-685-6869
- Website http://www.eiffel.com
- Customer support http://support.eiffel.com
- ]"
-*/
-
-#ifndef _ew_network_h_
-#define _ew_network_h_
-
-#include "eif_config.h"
-
-#ifdef EIF_WINDOWS
-# ifndef _WINSOCKAPI_
-# define FD_SETSIZE 256
-# include
-# include
-# include
-# endif
-#else /* unix-specific */
-# include
-# include
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* extern declarations ... */
-#ifdef EIF_WINDOWS
-extern int setsockopt(int, int, int, char*, int);
-extern int recv(int, char *, int, int);
-extern int send(int, char *, int, int);
-#else
-extern int setsockopt(int, int, int, const void*, socklen_t);
-extern ssize_t recv(int, void *, size_t, int);
-extern ssize_t send(int, const void *, size_t, int);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/library/network/http_network/src/http_stream_socket.e b/library/network/http_network/src/http_stream_socket.e
index 0e726744..997a47ec 100644
--- a/library/network/http_network/src/http_stream_socket.e
+++ b/library/network/http_network/src/http_stream_socket.e
@@ -9,8 +9,6 @@ class
inherit
NETWORK_STREAM_SOCKET
- HTTP_STREAM_SOCKET_EXT
-
create
make, make_empty,
make_client_by_port, make_client_by_address_and_port,
diff --git a/library/network/http_network/src/http_stream_socket_ext.e b/library/network/http_network/src/http_stream_socket_ext.e
deleted file mode 100644
index 6784d023..00000000
--- a/library/network/http_network/src/http_stream_socket_ext.e
+++ /dev/null
@@ -1,21 +0,0 @@
-note
- description: "[
- Extension to HTTPD_STREAM_SOCKET to support backward compatibility.
-
- TO BE REMOVED IN THE FUTURE, When there is no need to support older compilers.
- ]"
-
-deferred class
- HTTP_STREAM_SOCKET_EXT
-
-note
- copyright: "2011-2017, 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
- 5949 Hollister Ave., Goleta, CA 93117 USA
- Telephone 805-685-1006, Fax 805-685-6869
- Website http://www.eiffel.com
- Customer support http://support.eiffel.com
- ]"
-end
diff --git a/library/network/http_network/src/until_16_05/http_stream_socket_ext.e b/library/network/http_network/src/until_16_05/http_stream_socket_ext.e
deleted file mode 100644
index e1afb655..00000000
--- a/library/network/http_network/src/until_16_05/http_stream_socket_ext.e
+++ /dev/null
@@ -1,174 +0,0 @@
-note
- description: "[
- Until 16.05, the EiffelNet socket interface DOES NOT have
- - make_server_by_address_and_port
- - recv_timeout
- - send_timeout.
-
- TO BE REMOVED IN THE FUTURE, WHEN 16.05 IS OLD.
- ]"
-
-deferred class
- HTTP_STREAM_SOCKET_EXT
-
-inherit
- PLATFORM
-
-feature -- Initialization
-
- make
- deferred
- end
-
- make_server_by_address_and_port (a_address: INET_ADDRESS; a_port: INTEGER)
- -- Create server socket on `a_address' and `a_port'.
- require
- valid_port: a_port >= 0
- do
- make
- set_address (create {like address_type}.make_from_address_and_port (a_address, a_port))
- bind
- end
-
-feature -- Basic operation
-
- bind
- deferred
- end
-
-feature -- Access
-
- set_address (addr: detachable like address_type)
- deferred
- end
-
- address_type: NETWORK_SOCKET_ADDRESS
- deferred
- end
-
- descriptor: INTEGER
- -- Socket descriptor of current socket
- deferred
- end
-
- socket_buffer: MANAGED_POINTER
- deferred
- end
-
- read_socket_buffer: MANAGED_POINTER
- do
- Result := socket_buffer
- end
-
- put_socket_buffer: MANAGED_POINTER
- do
- Result := socket_buffer
- end
-
-feature -- Socket Recv and Send timeout.
-
- set_recv_timeout (a_timeout_seconds: INTEGER)
- -- Set the receive timeout in seconds on Current socket.
- -- if `0' the related operations will never timeout.
- require
- positive_timeout: a_timeout_seconds >= 0
- do
- c_set_sock_recv_timeout (descriptor, level_sol_socket, a_timeout_seconds)
- end
-
- set_send_timeout (a_timeout_seconds: INTEGER)
- -- Set the send timeout in milliseconds on Current socket.
- -- if `0' the related operations will never timeout.
- require
- positive_timeout: a_timeout_seconds >= 0
- do
- c_set_sock_send_timeout (descriptor, level_sol_socket, a_timeout_seconds)
- end
-
-feature {NONE} -- Externals
-
- level_sol_socket: INTEGER
- -- SOL_SOCKET level of options
- deferred
- end
-
- c_set_sock_recv_timeout (a_fd, a_level: INTEGER; a_timeout_seconds: INTEGER)
- -- C routine to set socket option `SO_RCVTIMEO' with `a_timeout_seconds' seconds.
- external
- "C inline use %"ew_network.h%""
- alias
- "[
-#ifdef SO_RCVTIMEO
- int flag = SO_RCVTIMEO;
-#else
- int flag = 0x1006;
-#endif
-
-#ifdef EIF_WINDOWS
- int arg = (int) 1000 * $a_timeout_seconds; /* Timeout in milliseconds */
- setsockopt((int) $a_fd, (int) $a_level, flag, (char *) &arg, sizeof(arg));
-#else
- struct timeval tv;
- tv.tv_sec = $a_timeout_seconds; /* Timeout in seconds */
- tv.tv_usec = 0;
- setsockopt((int) $a_fd, (int) $a_level, flag, (struct timeval *)&tv, sizeof(struct timeval));
-#endif
- ]"
- end
-
- c_set_sock_send_timeout (a_fd, a_level: INTEGER; a_timeout_seconds: INTEGER)
- -- C routine to set socket option `SO_SNDTIMEO' with `a_timeout_seconds' seconds.
- external
- "C inline use %"ew_network.h%""
- alias
- "[
-#ifdef SO_RCVTIMEO
- int flag = SO_SNDTIMEO;
-#else
- int flag = 0x1005;
-#endif
-#ifdef EIF_WINDOWS
- int arg = (int) 1000 * $a_timeout_seconds; /* Timeout in milliseconds */
- setsockopt((int) $a_fd, (int) $a_level, flag, (char *) &arg, sizeof(arg));
-#else
- struct timeval tv;
- tv.tv_sec = $a_timeout_seconds; /* Timeout in seconds */
- tv.tv_usec = 0;
- setsockopt((int) $a_fd, (int) $a_level, flag, (struct timeval *)&tv, sizeof(struct timeval));
-#endif
- ]"
- end
-
-feature {NONE} -- No-Exception network operation
-
- c_recv_noexception (a_fd: INTEGER; buf: POINTER; len: INTEGER; flags: INTEGER): INTEGER
- -- External routine to read a `len' number of characters
- -- into buffer `buf' from socket `a_fd' with options `flags'.
- external
- "C inline use %"ew_network.h%""
- alias
- "[
- recv((int) $a_fd, (char *) $buf, (int) $len, (int) $flags)
- ]"
- end
-
- c_read_stream_noexception (a_fd: INTEGER; len: INTEGER; buf: POINTER): INTEGER
- -- External routine to read a `len' number of characters
- -- into buffer `buf' from socket `a_fd'.
- do
- Result := c_recv_noexception (a_fd, buf, len, 0)
- end
-
- c_put_stream_noexception (a_fd: INTEGER; buf: POINTER; len: INTEGER): INTEGER
- -- External routine to write stream pointed by `s' of
- -- length `length' to socket `fd'.
- -- Note: does not raise exception on error, but return error value as Result.
- external
- "C inline use %"ew_network.h%""
- alias
- "[
- send((int) $a_fd, (char *) $buf, (int) $len, (int) 0)
- ]"
- end
-
-end
diff --git a/library/network/http_network/src/until_16_05/ssl/http_stream_secure_socket_ext.e b/library/network/http_network/src/until_16_05/ssl/http_stream_secure_socket_ext.e
deleted file mode 100644
index 6edcc3f2..00000000
--- a/library/network/http_network/src/until_16_05/ssl/http_stream_secure_socket_ext.e
+++ /dev/null
@@ -1,41 +0,0 @@
-note
- description: "[
- Extension to HTTP_STREAM_SOCKET to support backward compatibility.
-
- TO BE REMOVED IN THE FUTURE, WHEN 16.05 IS OLD.
- ]"
-
-deferred class
- HTTP_STREAM_SECURE_SOCKET_EXT
-
-feature {NONE} -- SSL bridge
-
- ssl_write (a_ssl: SSL; a_pointer: POINTER; a_byte_count: INTEGER): INTEGER
- do
- -- In delivery until 16.05
- -- SSL.write does not return any value!
- -- So let's use `c_ssl_write' from Current class
- -- instead of:
- -- a_ssl.write (a_pointer, a_byte_count)
-
- Result := c_ssl_write (a_ssl.ptr, a_pointer, a_byte_count)
- if a_ssl.was_error then
- -- Until 16.05, there is no error check for `SSL.write'
- -- so nothing can be done here.
-
- if Result >= 0 then
- Result := -1
- end
- end
- end
-
- c_ssl_write (an_ssl_ptr: POINTER; buffer: POINTER; nb_bytes: INTEGER_32): INTEGER_32
- -- External call to SSL_write
- -- (export status {NONE})
- external
- "C use %"eif_openssl.h%""
- alias
- "SSL_write"
- end
-
-end
diff --git a/library/network/http_network/src/until_17_01/http_stream_socket_ext.e b/library/network/http_network/src/until_17_01/http_stream_socket_ext.e
deleted file mode 100644
index 4fd8c60c..00000000
--- a/library/network/http_network/src/until_17_01/http_stream_socket_ext.e
+++ /dev/null
@@ -1,29 +0,0 @@
-note
- description: "[
- Extension to HTTPD_STREAM_SOCKET to support backward compatibility.
-
- TO BE REMOVED IN THE FUTURE, WHEN 17.01 IS OLD.
- ]"
-
-deferred class
- HTTP_STREAM_SOCKET_EXT
-
-feature -- Access
-
- socket_buffer: MANAGED_POINTER
- deferred
- end
-
- read_socket_buffer: MANAGED_POINTER
- do
- Result := socket_buffer
- end
-
- put_socket_buffer: MANAGED_POINTER
- do
- Result := socket_buffer
- end
-
-feature {NONE} -- No-Exception network operation
-
-end
diff --git a/library/network/protocol/content_negotiation/conneg-safe.ecf b/library/network/protocol/content_negotiation/conneg-safe.ecf
index 5d6d4530..f1fbd940 100644
--- a/library/network/protocol/content_negotiation/conneg-safe.ecf
+++ b/library/network/protocol/content_negotiation/conneg-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /CVS$
- /EIFGENs$
-
-
-
-
-
-
-
- /implementation
-
-
-
-
-
+
+
diff --git a/library/network/protocol/content_negotiation/conneg.ecf b/library/network/protocol/content_negotiation/conneg.ecf
index 976cc952..cd6165cf 100644
--- a/library/network/protocol/content_negotiation/conneg.ecf
+++ b/library/network/protocol/content_negotiation/conneg.ecf
@@ -1,18 +1,17 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
+
/implementation
diff --git a/library/network/protocol/content_negotiation/package.iron b/library/network/protocol/content_negotiation/package.iron
index ab6d6d37..11c1066c 100644
--- a/library/network/protocol/content_negotiation/package.iron
+++ b/library/network/protocol/content_negotiation/package.iron
@@ -1,14 +1,14 @@
package content_negotiation
project
- conneg = "conneg-safe.ecf"
conneg = "conneg.ecf"
note
title: CONneg Content Negotiation
description: "[
- CONneg is a library that provides utilities to select the best repesentation of a resource for a client where there are multiple representations available.
- ]"
+CONneg is a library that provides utilities to select the best repesentation of a resource for a client where there are multiple representations available.
+ ]"
+
collection: EWF
tags: content,accept,conneg,negotiation,EWF,web,request
copyright: 2011-2016, Javier Velilla, Jocelyn Fiat, Eiffel Software and others
diff --git a/library/network/protocol/content_negotiation/test/test-safe.ecf b/library/network/protocol/content_negotiation/test/test-safe.ecf
deleted file mode 100644
index 4a9f2d8f..00000000
--- a/library/network/protocol/content_negotiation/test/test-safe.ecf
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
- /.git$
- /.svn$
- /CVS$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/network/protocol/content_negotiation/test/test.ecf b/library/network/protocol/content_negotiation/test/test.ecf
index a1e3c37f..3e78c1a0 100644
--- a/library/network/protocol/content_negotiation/test/test.ecf
+++ b/library/network/protocol/content_negotiation/test/test.ecf
@@ -1,18 +1,25 @@
-
-
+
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
+
+
+
-
+
+
+
diff --git a/library/network/protocol/http/http-safe.ecf b/library/network/protocol/http/http-safe.ecf
index 4cf5101a..7e52f63d 100644
--- a/library/network/protocol/http/http-safe.ecf
+++ b/library/network/protocol/http/http-safe.ecf
@@ -1,21 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
- /tests$
-
-
-
-
+
+
diff --git a/library/network/protocol/http/http.ecf b/library/network/protocol/http/http.ecf
index b3c48093..ca4cdf32 100644
--- a/library/network/protocol/http/http.ecf
+++ b/library/network/protocol/http/http.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/network/protocol/http/package.iron b/library/network/protocol/http/package.iron
index 8e22d41f..2e4bab84 100644
--- a/library/network/protocol/http/package.iron
+++ b/library/network/protocol/http/package.iron
@@ -1,20 +1,20 @@
package http
project
- http = "http-safe.ecf"
http = "http.ecf"
note
title: HTTP protocol
description: "[
- Collection of interfaces related to HTTP protocol:
- - header
- - status codes, request methods
- - content type, media type, mime type.
- - cookie
- - date used in web protocol
- - file extension mime mapping
- ]"
+Collection of interfaces related to HTTP protocol:
+ - header
+ - status codes, request methods
+ - content type, media type, mime type.
+ - cookie
+ - date used in web protocol
+ - file extension mime mapping
+ ]"
+
collection: EWF
tags: http,web,header,status,method,type,mime,cookie
license: Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)
diff --git a/library/network/protocol/http/tests/tests-safe.ecf b/library/network/protocol/http/tests/tests-safe.ecf
deleted file mode 100644
index 7ad1cdd1..00000000
--- a/library/network/protocol/http/tests/tests-safe.ecf
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/network/protocol/http/tests/tests.ecf b/library/network/protocol/http/tests/tests.ecf
index 212d1706..4c0ceaec 100644
--- a/library/network/protocol/http/tests/tests.ecf
+++ b/library/network/protocol/http/tests/tests.ecf
@@ -1,17 +1,24 @@
-
-
+
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
+
+
+
-
+
+
+
diff --git a/library/network/websocket/client/example/ws_client/ws_client-safe.ecf b/library/network/websocket/client/example/ws_client/ws_client.ecf
similarity index 60%
rename from library/network/websocket/client/example/ws_client/ws_client-safe.ecf
rename to library/network/websocket/client/example/ws_client/ws_client.ecf
index d46065be..2efdb434 100644
--- a/library/network/websocket/client/example/ws_client/ws_client-safe.ecf
+++ b/library/network/websocket/client/example/ws_client/ws_client.ecf
@@ -1,24 +1,22 @@
-
-
+
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
+
+
-
diff --git a/library/network/websocket/client/web_socket_client-safe.ecf b/library/network/websocket/client/web_socket_client-safe.ecf
index d0cc963e..e6f51f09 100644
--- a/library/network/websocket/client/web_socket_client-safe.ecf
+++ b/library/network/websocket/client/web_socket_client-safe.ecf
@@ -1,43 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /CVS$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
- /no_ssl$
- /spec$
- /ssl$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/network/websocket/client/web_socket_client.ecf b/library/network/websocket/client/web_socket_client.ecf
index 23ebc15e..5a197e17 100644
--- a/library/network/websocket/client/web_socket_client.ecf
+++ b/library/network/websocket/client/web_socket_client.ecf
@@ -1,16 +1,15 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
diff --git a/library/network/websocket/protocol/web_socket_protocol-safe.ecf b/library/network/websocket/protocol/web_socket_protocol-safe.ecf
index 0b08d9a0..65e42fa6 100644
--- a/library/network/websocket/protocol/web_socket_protocol-safe.ecf
+++ b/library/network/websocket/protocol/web_socket_protocol-safe.ecf
@@ -1,9 +1,3 @@
-
-
-
-
-
-
-
-
+
+
diff --git a/library/network/websocket/protocol/web_socket_protocol.ecf b/library/network/websocket/protocol/web_socket_protocol.ecf
index c3d310e4..9b853327 100644
--- a/library/network/websocket/protocol/web_socket_protocol.ecf
+++ b/library/network/websocket/protocol/web_socket_protocol.ecf
@@ -1,10 +1,7 @@
-
+
-
-
diff --git a/library/network/websocket/server/example/echo_websocket_server/echo_websocket_server-safe.ecf b/library/network/websocket/server/example/echo_websocket_server/echo_websocket_server.ecf
similarity index 69%
rename from library/network/websocket/server/example/echo_websocket_server/echo_websocket_server-safe.ecf
rename to library/network/websocket/server/example/echo_websocket_server/echo_websocket_server.ecf
index 0567d72c..fb865f91 100644
--- a/library/network/websocket/server/example/echo_websocket_server/echo_websocket_server-safe.ecf
+++ b/library/network/websocket/server/example/echo_websocket_server/echo_websocket_server.ecf
@@ -1,27 +1,26 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
+
-
-
-
-
+
+
+
+
@@ -30,14 +29,15 @@
-
+
+
+
-
diff --git a/library/network/websocket/server/websocket_server-safe.ecf b/library/network/websocket/server/websocket_server-safe.ecf
index f2fd971d..610c89cb 100644
--- a/library/network/websocket/server/websocket_server-safe.ecf
+++ b/library/network/websocket/server/websocket_server-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /CVS$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/network/websocket/server/websocket_server.ecf b/library/network/websocket/server/websocket_server.ecf
index 8b5ed2aa..c71e337b 100644
--- a/library/network/websocket/server/websocket_server.ecf
+++ b/library/network/websocket/server/websocket_server.ecf
@@ -1,19 +1,18 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
+
diff --git a/library/runtime/process/notification_email/notification_email-safe.ecf b/library/runtime/process/notification_email/notification_email-safe.ecf
index 46863fca..06189333 100644
--- a/library/runtime/process/notification_email/notification_email-safe.ecf
+++ b/library/runtime/process/notification_email/notification_email-safe.ecf
@@ -1,42 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/runtime/process/notification_email/notification_email.ecf b/library/runtime/process/notification_email/notification_email.ecf
index 5f5937a6..b2ae85e9 100644
--- a/library/runtime/process/notification_email/notification_email.ecf
+++ b/library/runtime/process/notification_email/notification_email.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/runtime/process/notification_email/package.iron b/library/runtime/process/notification_email/package.iron
index 74f0d5f4..17abbb58 100644
--- a/library/runtime/process/notification_email/package.iron
+++ b/library/runtime/process/notification_email/package.iron
@@ -1,25 +1,24 @@
package notification_email
project
- notification_email = "notification_email-safe.ecf"
notification_email = "notification_email.ecf"
note
title: Notification Email
description: "[
- Abstract interface to send message via various mailers:
- - smtp
- - sendmail
- - external script
- - store on local file
- - ...
- ]"
+Abstract interface to send message via various mailers:
+ - smtp
+ - sendmail
+ - external script
+ - store on local file
+ - ...
+ ]"
+
collection: EWF
tags: message,smtp,sendmail,mailer
- copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
+ copyright: 2011-2016, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others
license: Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)
link[license]: http://www.eiffel.com/licensing/forum.txt
link[source]: "github" https://github.com/EiffelWebFramework/EWF/tree/master/library/runtime/process/notification_email
end
-
diff --git a/library/security/jwt/jwt-safe.ecf b/library/security/jwt/jwt-safe.ecf
index f2d8c544..075633dd 100644
--- a/library/security/jwt/jwt-safe.ecf
+++ b/library/security/jwt/jwt-safe.ecf
@@ -1,15 +1,3 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/security/jwt/jwt.ecf b/library/security/jwt/jwt.ecf
index 8deb9ee8..64ea70b9 100644
--- a/library/security/jwt/jwt.ecf
+++ b/library/security/jwt/jwt.ecf
@@ -1,10 +1,9 @@
-
+
-
-
diff --git a/library/security/jwt/package.iron b/library/security/jwt/package.iron
index fd132cd6..3fa82da0 100644
--- a/library/security/jwt/package.iron
+++ b/library/security/jwt/package.iron
@@ -6,7 +6,7 @@ project
note
title: JSON Web Token
description: JSON Web Token
- tags:jwt,web,jws,jwe,token,jose
+ tags: jwt,web,jws,jwe,token,jose
copyright: 2011-2017, Jocelyn Fiat, Eiffel Software and others
license: Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)
link[license]: http://www.eiffel.com/licensing/forum.txt
diff --git a/library/security/jwt/src/jwt.e b/library/security/jwt/src/jwt.e
index f23091fb..acf1e3e0 100644
--- a/library/security/jwt/src/jwt.e
+++ b/library/security/jwt/src/jwt.e
@@ -59,6 +59,8 @@ feature -- Status report
do
if attached claimset.issuer as iss then
Result := a_issuer = Void or else a_issuer.same_string (iss)
+ else
+ Result := a_issuer = Void
end
end
@@ -66,6 +68,8 @@ feature -- Status report
do
if attached claimset.audience as aud then
Result := a_audience = Void or else a_audience.same_string (aud)
+ else
+ Result := a_audience = Void
end
end
diff --git a/library/security/jwt/testing/testing.ecf b/library/security/jwt/testing/testing.ecf
index 7bad43cb..09486123 100644
--- a/library/security/jwt/testing/testing.ecf
+++ b/library/security/jwt/testing/testing.ecf
@@ -1,13 +1,16 @@
-
+
-
-
-
+
+
+
+
+
-
+
diff --git a/library/security/openid/consumer/demo/demo-safe.ecf b/library/security/openid/consumer/demo/demo-safe.ecf
index 8eac088d..3220946d 100644
--- a/library/security/openid/consumer/demo/demo-safe.ecf
+++ b/library/security/openid/consumer/demo/demo-safe.ecf
@@ -1,26 +1,3 @@
-
-
-
-
- /.svn$
- /CVS$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/security/openid/consumer/demo/demo.ecf b/library/security/openid/consumer/demo/demo.ecf
new file mode 100644
index 00000000..2c51fa43
--- /dev/null
+++ b/library/security/openid/consumer/demo/demo.ecf
@@ -0,0 +1,27 @@
+
+
+
+
+
+ /\.svn$
+ /CVS$
+ /EIFGENs$
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/library/security/openid/consumer/openid-safe.ecf b/library/security/openid/consumer/openid-safe.ecf
index 8aec8717..d6fc87c8 100644
--- a/library/security/openid/consumer/openid-safe.ecf
+++ b/library/security/openid/consumer/openid-safe.ecf
@@ -1,21 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/security/openid/consumer/openid.ecf b/library/security/openid/consumer/openid.ecf
index cd353d0e..a94a449e 100644
--- a/library/security/openid/consumer/openid.ecf
+++ b/library/security/openid/consumer/openid.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/security/openid/consumer/tests/tests-safe.ecf b/library/security/openid/consumer/tests/tests-safe.ecf
deleted file mode 100644
index b0af2618..00000000
--- a/library/security/openid/consumer/tests/tests-safe.ecf
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
diff --git a/library/security/openid/consumer/tests/tests.ecf b/library/security/openid/consumer/tests/tests.ecf
new file mode 100644
index 00000000..497ab39b
--- /dev/null
+++ b/library/security/openid/consumer/tests/tests.ecf
@@ -0,0 +1,21 @@
+
+
+
+
+
+ /\.git$
+ /\.svn$
+ /EIFGENs$
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/library/security/openid/package.iron b/library/security/openid/package.iron
index 80c50f34..2d11f51f 100644
--- a/library/security/openid/package.iron
+++ b/library/security/openid/package.iron
@@ -2,13 +2,11 @@ package openid
project
openid = "consumer/openid.ecf"
- openid = "consumer/openid-safe.ecf"
note
title: Eiffel OpenID
- description: OpenID consumer library
+ description: OpenID consumer library
tags: openid,security,web,authentication,sso
- license: Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)
copyright: 2011-2016, Jocelyn Fiat, Eiffel Software and others
license: Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)
link[license]: http://www.eiffel.com/licensing/forum.txt
@@ -16,4 +14,3 @@ note
link[doc]: "Documentation" https://github.com/EiffelWebFramework/EWF/tree/master/library/security/http_authorization/README.md
end
-
diff --git a/library/server/authentication/http_authorization/example/demo_basic_auth.ecf b/library/server/authentication/http_authorization/example/demo_basic_auth.ecf
index dd83dba4..8b427abf 100644
--- a/library/server/authentication/http_authorization/example/demo_basic_auth.ecf
+++ b/library/server/authentication/http_authorization/example/demo_basic_auth.ecf
@@ -1,21 +1,21 @@
-
+
- /.svn$
+ /\.svn$
/CVS$
/EIFGENs$
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/library/server/authentication/http_authorization/http_authorization-safe.ecf b/library/server/authentication/http_authorization/http_authorization-safe.ecf
index 4842c70e..48f5a40e 100644
--- a/library/server/authentication/http_authorization/http_authorization-safe.ecf
+++ b/library/server/authentication/http_authorization/http_authorization-safe.ecf
@@ -1,17 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/authentication/http_authorization/http_authorization.ecf b/library/server/authentication/http_authorization/http_authorization.ecf
index 4e29ed39..3495174d 100644
--- a/library/server/authentication/http_authorization/http_authorization.ecf
+++ b/library/server/authentication/http_authorization/http_authorization.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/authentication/http_authorization/package.iron b/library/server/authentication/http_authorization/package.iron
index 7a597b0b..20a2d47e 100644
--- a/library/server/authentication/http_authorization/package.iron
+++ b/library/server/authentication/http_authorization/package.iron
@@ -1,14 +1,14 @@
package http_authorization
project
- http_authorization = "http_authorization-safe.ecf"
http_authorization = "http_authorization.ecf"
note
title: HTTP Authorization
description: "[
- Class to manipulate HTTP 'Authorization' header value.
- ]"
+Class to manipulate HTTP 'Authorization' header value.
+ ]"
+
collection: EWF
tags: http,authorization,authentication,web
copyright: 2011-2016, Jocelyn Fiat, Eiffel Software and others
@@ -17,4 +17,3 @@ note
link[source]: "github" https://github.com/EiffelWebFramework/EWF/tree/master/library/server/authentication/http_authorization
end
-
diff --git a/library/server/authentication/http_authorization/src/http_authorization.e b/library/server/authentication/http_authorization/src/http_authorization.e
index abc9a83c..ac93520e 100644
--- a/library/server/authentication/http_authorization/src/http_authorization.e
+++ b/library/server/authentication/http_authorization/src/http_authorization.e
@@ -76,13 +76,13 @@ feature -- Initialization
a_http_authorization /= Void implies http_authorization /= Void
end
- make_basic_auth (u: READABLE_STRING_32; p: READABLE_STRING_32)
+ make_basic_auth (u: READABLE_STRING_GENERAL; p: READABLE_STRING_GENERAL)
-- Create a Basic authentication.
do
make_custom_auth (u, p, Basic_auth_type)
end
- make_custom_auth (u: READABLE_STRING_32; p: READABLE_STRING_32; a_type: READABLE_STRING_8)
+ make_custom_auth (u: READABLE_STRING_GENERAL; p: READABLE_STRING_GENERAL; a_type: READABLE_STRING_8)
-- Create a custom `a_type' authentication.
require
a_type_accepted: a_type.is_case_insensitive_equal (Basic_auth_type)
@@ -90,15 +90,20 @@ feature -- Initialization
local
t: STRING_8
utf: UTF_CONVERTER
+ s: STRING_32
do
- login := u
- password := p
+ create login.make_from_string_general (u)
+ create password.make_from_string_general (p)
create t.make_from_string (a_type)
t.left_adjust; t.right_adjust
type := t
if t.is_case_insensitive_equal (Basic_auth_type) then
type := Basic_auth_type
- create http_authorization.make_from_string ("Basic " + (create {BASE64}).encoded_string (utf.string_32_to_utf_8_string_8 (u + {STRING_32} ":" + p)))
+ create s.make_from_string_general (u)
+ s.extend (':')
+ s.append_string_general (p)
+ create http_authorization.make_from_string ("Basic " + (create {BASE64}).encoded_string (utf.string_32_to_utf_8_string_8 (s)))
+
elseif t.is_case_insensitive_equal (Digest_auth_type) then
type := Digest_auth_type
to_implement ("HTTP Authorization %""+ t +"%", not yet implemented")
@@ -115,9 +120,9 @@ feature -- Access
type: READABLE_STRING_8
- login: detachable READABLE_STRING_32
+ login: detachable IMMUTABLE_STRING_32
- password: detachable READABLE_STRING_32
+ password: detachable IMMUTABLE_STRING_32
feature -- Status report
diff --git a/library/server/authentication/http_authorization/testing/testing-safe.ecf b/library/server/authentication/http_authorization/testing/testing.ecf
similarity index 53%
rename from library/server/authentication/http_authorization/testing/testing-safe.ecf
rename to library/server/authentication/http_authorization/testing/testing.ecf
index 0a5fa8fb..cbd22c73 100644
--- a/library/server/authentication/http_authorization/testing/testing-safe.ecf
+++ b/library/server/authentication/http_authorization/testing/testing.ecf
@@ -1,19 +1,21 @@
-
-
+
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
-
-
-
+
+
+
+
+
+
diff --git a/library/server/ewsgi/connectors/cgi/cgi-safe.ecf b/library/server/ewsgi/connectors/cgi/cgi-safe.ecf
index 326f479c..ca144501 100644
--- a/library/server/ewsgi/connectors/cgi/cgi-safe.ecf
+++ b/library/server/ewsgi/connectors/cgi/cgi-safe.ecf
@@ -1,19 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/ewsgi/connectors/cgi/cgi.ecf b/library/server/ewsgi/connectors/cgi/cgi.ecf
index 449fe8be..331cb277 100644
--- a/library/server/ewsgi/connectors/cgi/cgi.ecf
+++ b/library/server/ewsgi/connectors/cgi/cgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/ewsgi/connectors/libfcgi/libfcgi-safe.ecf b/library/server/ewsgi/connectors/libfcgi/libfcgi-safe.ecf
index 89e15d79..87ac1628 100644
--- a/library/server/ewsgi/connectors/libfcgi/libfcgi-safe.ecf
+++ b/library/server/ewsgi/connectors/libfcgi/libfcgi-safe.ecf
@@ -1,20 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/ewsgi/connectors/libfcgi/libfcgi.ecf b/library/server/ewsgi/connectors/libfcgi/libfcgi.ecf
index 6d18b0ce..6e9c64f3 100644
--- a/library/server/ewsgi/connectors/libfcgi/libfcgi.ecf
+++ b/library/server/ewsgi/connectors/libfcgi/libfcgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,12 +7,11 @@
/\.git$
/\.svn$
-
-
-
+
diff --git a/library/server/ewsgi/connectors/nino/nino-safe.ecf b/library/server/ewsgi/connectors/nino/nino-safe.ecf
index 27ca8446..f479519a 100644
--- a/library/server/ewsgi/connectors/nino/nino-safe.ecf
+++ b/library/server/ewsgi/connectors/nino/nino-safe.ecf
@@ -1,22 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/ewsgi/connectors/nino/nino.ecf b/library/server/ewsgi/connectors/nino/nino.ecf
index 39974ba4..f4c0b793 100644
--- a/library/server/ewsgi/connectors/nino/nino.ecf
+++ b/library/server/ewsgi/connectors/nino/nino.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,11 @@
/\.git$
/\.svn$
-
-
+
+
+
diff --git a/library/server/ewsgi/connectors/null/null-safe.ecf b/library/server/ewsgi/connectors/null/null-safe.ecf
index b4473379..697cec65 100644
--- a/library/server/ewsgi/connectors/null/null-safe.ecf
+++ b/library/server/ewsgi/connectors/null/null-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/ewsgi/connectors/null/null.ecf b/library/server/ewsgi/connectors/null/null.ecf
index b5aa764f..64b2c082 100644
--- a/library/server/ewsgi/connectors/null/null.ecf
+++ b/library/server/ewsgi/connectors/null/null.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/ewsgi/connectors/standalone/standalone-safe.ecf b/library/server/ewsgi/connectors/standalone/standalone-safe.ecf
index fe2e274d..ac16a883 100644
--- a/library/server/ewsgi/connectors/standalone/standalone-safe.ecf
+++ b/library/server/ewsgi/connectors/standalone/standalone-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/ewsgi/connectors/standalone/standalone.ecf b/library/server/ewsgi/connectors/standalone/standalone.ecf
index fd5e231f..445e9b93 100644
--- a/library/server/ewsgi/connectors/standalone/standalone.ecf
+++ b/library/server/ewsgi/connectors/standalone/standalone.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf b/library/server/ewsgi/connectors/standalone/test_standalone.ecf
similarity index 60%
rename from library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf
rename to library/server/ewsgi/connectors/standalone/test_standalone.ecf
index 84dba0fa..f3e50fee 100644
--- a/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf
+++ b/library/server/ewsgi/connectors/standalone/test_standalone.ecf
@@ -1,23 +1,26 @@
-
+
-
-
-
-
-
+
+
+
+
-
+
+
+
-
+
+
+
diff --git a/library/server/ewsgi/ewsgi-safe.ecf b/library/server/ewsgi/ewsgi-safe.ecf
index c536c87d..2abfda29 100644
--- a/library/server/ewsgi/ewsgi-safe.ecf
+++ b/library/server/ewsgi/ewsgi-safe.ecf
@@ -1,25 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/ewsgi/ewsgi.ecf b/library/server/ewsgi/ewsgi.ecf
index d4e5e408..8e8b162c 100644
--- a/library/server/ewsgi/ewsgi.ecf
+++ b/library/server/ewsgi/ewsgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/ewsgi/ewsgi_spec-safe.ecf b/library/server/ewsgi/ewsgi_spec-safe.ecf
index 4da91d4a..6d38ecf8 100644
--- a/library/server/ewsgi/ewsgi_spec-safe.ecf
+++ b/library/server/ewsgi/ewsgi_spec-safe.ecf
@@ -1,17 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/ewsgi/ewsgi_spec.ecf b/library/server/ewsgi/ewsgi_spec.ecf
index 39f696e0..d5abca8f 100644
--- a/library/server/ewsgi/ewsgi_spec.ecf
+++ b/library/server/ewsgi/ewsgi_spec.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/ewsgi/examples/hello_world/hello-safe.ecf b/library/server/ewsgi/examples/hello_world/hello-safe.ecf
deleted file mode 100644
index 9b1b132e..00000000
--- a/library/server/ewsgi/examples/hello_world/hello-safe.ecf
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
diff --git a/library/server/ewsgi/examples/hello_world/hello.ecf b/library/server/ewsgi/examples/hello_world/hello.ecf
index ea014b23..c7975849 100644
--- a/library/server/ewsgi/examples/hello_world/hello.ecf
+++ b/library/server/ewsgi/examples/hello_world/hello.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/ewsgi/package.iron b/library/server/ewsgi/package.iron
index 504ddcc3..a20fb463 100644
--- a/library/server/ewsgi/package.iron
+++ b/library/server/ewsgi/package.iron
@@ -1,24 +1,20 @@
package ewsgi
project
- ewsgi = "ewsgi-safe.ecf"
ewsgi = "ewsgi.ecf"
- connector_cgi = "connectors/cgi/cgi-safe.ecf"
connector_cgi = "connectors/cgi/cgi.ecf"
- connector_libfcgi = "connectors/libfcgi/libfcgi-safe.ecf"
connector_libfcgi = "connectors/libfcgi/libfcgi.ecf"
- connector_null = "connectors/null/null-safe.ecf"
connector_null = "connectors/null/null.ecf"
- connector_standalone = "connectors/standalone/standalone-safe.ecf"
connector_standalone = "connectors/standalone/standalone.ecf"
- httpd = "connectors/standalone/src/httpd/httpd-safe.ecf"
- httpd = "connectors/standalone/src/httpd/httpd.ecf"
+ ewsgi_spec = "ewsgi_spec.ecf"
+ connector_nino = "connectors/nino/nino.ecf"
note
title: EWSGI
description: "[
- Eiffel Web Server Gateway Interface (EWSGI) specification, and a few connectors.
- ]"
+Eiffel Web Server Gateway Interface (EWSGI) specification, and a few connectors.
+ ]"
+
collection: EWF
tags: ewsgi,cgi,web,httpd,ewf
copyright: 2011-2016, Jocelyn Fiat, Eiffel Software and others
@@ -26,5 +22,5 @@ note
link[license]: http://www.eiffel.com/licensing/forum.txt
link[source]: "github" https://github.com/EiffelWebFramework/EWF/tree/master/library/server/ewsgi
link[doc]: "Documentation" https://github.com/EiffelWebFramework/EWF/tree/master/library/server/ewsgi/doc
-end
+end
diff --git a/library/server/httpd/concurrency/none/httpd_request_handler.e b/library/server/httpd/concurrency/none/httpd_request_handler.e
index c033de78..808fb033 100644
--- a/library/server/httpd/concurrency/none/httpd_request_handler.e
+++ b/library/server/httpd/concurrency/none/httpd_request_handler.e
@@ -8,19 +8,9 @@ deferred class
inherit
HTTPD_REQUEST_HANDLER_I
- redefine
- is_persistent_connection_supported
- end
-
-feature -- Status report
-
- is_persistent_connection_supported: BOOLEAN = False
- --
- -- When there is no concurrency support, do not try to support
- -- persistent connection!
note
- copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
+ copyright: "2011-2017, 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/server/httpd/configuration/httpd_configuration_i.e b/library/server/httpd/configuration/httpd_configuration_i.e
index f02c35e6..4d7054b9 100644
--- a/library/server/httpd/configuration/httpd_configuration_i.e
+++ b/library/server/httpd/configuration/httpd_configuration_i.e
@@ -297,16 +297,17 @@ feature -- Element change
set_secure_protocol_from_string (a_ssl_version: READABLE_STRING_GENERAL)
-- Set `secure_protocol' with `a_ssl_version'.
do
- if a_ssl_version.is_case_insensitive_equal ("ssl_2_3") then
- set_secure_protocol_to_ssl_2_or_3
- elseif a_ssl_version.is_case_insensitive_equal ("tls_1_0") then
- set_secure_protocol_to_tls_1_0
+ if a_ssl_version.is_case_insensitive_equal ("tls_1_2") then
+ set_secure_protocol_to_tls_1_2
elseif a_ssl_version.is_case_insensitive_equal ("tls_1_1") then
set_secure_protocol_to_tls_1_1
- elseif a_ssl_version.is_case_insensitive_equal ("tls_1_2") then
- set_secure_protocol_to_tls_1_2
+ elseif a_ssl_version.is_case_insensitive_equal ("tls_1_0") then
+ set_secure_protocol_to_tls_1_0
elseif a_ssl_version.is_case_insensitive_equal ("dtls_1_0") then
set_secure_protocol_to_dtls_1_0
+ elseif a_ssl_version.is_case_insensitive_equal ("ssl_2_3") then
+ -- Obsolete!
+ set_secure_protocol_to_ssl_2_or_3
else -- Default
set_secure_protocol_to_tls_1_2
end
@@ -317,7 +318,7 @@ feature -- SSL Helpers
set_secure_protocol_to_ssl_2_or_3
-- Set `secure_protocol' with `Ssl_23'.
obsolete
- "Use set_secure_protocol_to_tls_1_2 [2017-06-23]."
+ "Use `set_secure_protocol_to_tls_1_2` [2017-06-23]."
deferred
end
diff --git a/library/server/httpd/configuration/httpd_constants.e b/library/server/httpd/configuration/httpd_constants.e
index 80fbef03..2a0ed315 100644
--- a/library/server/httpd/configuration/httpd_constants.e
+++ b/library/server/httpd/configuration/httpd_constants.e
@@ -25,8 +25,8 @@ feature -- Default timeout settings
feature -- Default persistent connection settings
- default_keep_alive_timeout: INTEGER = 15 -- seconds
- default_max_keep_alive_requests: INTEGER = 100
+ default_keep_alive_timeout: INTEGER = 5 -- seconds
+ default_max_keep_alive_requests: INTEGER = 300
note
copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
diff --git a/library/server/httpd/httpd-safe.ecf b/library/server/httpd/httpd-safe.ecf
index 0c70796f..eb953c50 100644
--- a/library/server/httpd/httpd-safe.ecf
+++ b/library/server/httpd/httpd-safe.ecf
@@ -1,70 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /concurrency$
- /no_ssl$
- /ssl$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/httpd/httpd.ecf b/library/server/httpd/httpd.ecf
index d4012fd7..9f10b47d 100644
--- a/library/server/httpd/httpd.ecf
+++ b/library/server/httpd/httpd.ecf
@@ -1,15 +1,12 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
@@ -17,8 +14,11 @@
+
+
-
+
+
@@ -36,16 +36,12 @@
-
-
-
-
@@ -64,4 +60,7 @@
+
+
+
diff --git a/library/server/httpd/httpd_request_handler_i.e b/library/server/httpd/httpd_request_handler_i.e
index d2598206..c61a1759 100644
--- a/library/server/httpd/httpd_request_handler_i.e
+++ b/library/server/httpd/httpd_request_handler_i.e
@@ -140,7 +140,8 @@ feature -- Settings
is_persistent_connection_supported: BOOLEAN
-- Is persistent connection supported?
do
- Result := {HTTPD_SERVER}.is_persistent_connection_supported and then max_keep_alive_requests > 0
+ Result := {HTTPD_SERVER}.is_persistent_connection_supported and then
+ max_keep_alive_requests /= 0 --| `-1` no limit
end
is_next_persistent_connection_supported: BOOLEAN
@@ -247,7 +248,8 @@ feature -- Execution
l_exit
loop
n := n + 1
- if n >= m then
+ -- If `m` is `-1`, no limit for the number of keep_alive requests.
+ if m >= 0 and n >= m then
is_next_persistent_connection_supported := False
elseif n > 1 and is_verbose then
log ("Reuse connection (" + n.out + ")", information_level)
diff --git a/library/server/httpd/package.iron b/library/server/httpd/package.iron
index bb34ce9f..66a6fc00 100644
--- a/library/server/httpd/package.iron
+++ b/library/server/httpd/package.iron
@@ -1,14 +1,14 @@
package httpd
project
- httpd = "httpd-safe.ecf"
httpd = "httpd.ecf"
note
title: HTTP server
description: "[
- Simple HTTP listener and handler, that can be extended easily.
- ]"
+Simple HTTP listener and handler, that can be extended easily.
+ ]"
+
tags: http,httpd,server,web
collection: EWF
copyright: 2011-2016, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others
diff --git a/library/server/libfcgi/libfcgi-safe.ecf b/library/server/libfcgi/libfcgi-safe.ecf
index c94eb0ee..fc19a31b 100644
--- a/library/server/libfcgi/libfcgi-safe.ecf
+++ b/library/server/libfcgi/libfcgi-safe.ecf
@@ -1,67 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fake$
- /linux$
- /mac$
-
-
-
-
-
- /fake$
- /mac$
- /windows$
-
-
-
-
-
- /fake$
- /linux$
- /windows$
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/libfcgi/libfcgi.ecf b/library/server/libfcgi/libfcgi.ecf
index 8131c309..120167c6 100644
--- a/library/server/libfcgi/libfcgi.ecf
+++ b/library/server/libfcgi/libfcgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/libfcgi/package.iron b/library/server/libfcgi/package.iron
index d60015d3..6c6f0ec9 100644
--- a/library/server/libfcgi/package.iron
+++ b/library/server/libfcgi/package.iron
@@ -4,16 +4,16 @@ setup
compile_library = Clib
project
- libfcgi = "libfcgi-safe.ecf"
libfcgi = "libfcgi.ecf"
note
title: Eiffel libfcgi wrapper
description: "[
- Wrapper on modified libfcgi.
- (modification: added 64 bits support)
- It brings implementation for FCGI protocol.
- ]"
+Wrapper on modified libfcgi.
+(modification: added 64 bits support)
+It brings implementation for FCGI protocol.
+ ]"
+
collection: EWF
tags: fcgi,libfcgi,cgi,http,web,ewf
copyright: 2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others
diff --git a/library/server/libfcgi/tests/eiffelweb-safe.ecf b/library/server/libfcgi/tests/eiffelweb-safe.ecf
deleted file mode 100644
index 16a5f343..00000000
--- a/library/server/libfcgi/tests/eiffelweb-safe.ecf
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
diff --git a/library/server/libfcgi/tests/eiffelweb.ecf b/library/server/libfcgi/tests/eiffelweb.ecf
index f7157475..d9ca400f 100644
--- a/library/server/libfcgi/tests/eiffelweb.ecf
+++ b/library/server/libfcgi/tests/eiffelweb.ecf
@@ -1,16 +1,16 @@
-
-
+
+
/EIFGENs$
/\.git$
/\.svn$
-
-
+
+
+
diff --git a/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi-safe.ecf b/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi-safe.ecf
index d59d3d4e..fcb6d042 100644
--- a/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi-safe.ecf
+++ b/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi-safe.ecf
@@ -1,24 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
- /wgi_.*_connector.e$
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf b/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf
index 43238190..59057676 100644
--- a/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf
+++ b/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,18 +7,15 @@
/\.git$
/\.svn$
-
-
- /.*_service.e$
/wgi_.*_connector.e$
- /wgi_.*_handler.e$
diff --git a/library/server/obsolete/v0/ewsgi/connectors/nino/nino-safe.ecf b/library/server/obsolete/v0/ewsgi/connectors/nino/nino-safe.ecf
index 3ce5811e..d90cfb1f 100644
--- a/library/server/obsolete/v0/ewsgi/connectors/nino/nino-safe.ecf
+++ b/library/server/obsolete/v0/ewsgi/connectors/nino/nino-safe.ecf
@@ -1,29 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
- /.*_service.e$
- /wgi_.*_connector.e$
- /wgi_.*_handler.e$
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf b/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf
index 1011a571..95bdc684 100644
--- a/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf
+++ b/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,11 @@
/\.git$
/\.svn$
-
-
+
+
+
diff --git a/library/server/obsolete/v0/ewsgi/ewsgi-safe.ecf b/library/server/obsolete/v0/ewsgi/ewsgi-safe.ecf
index 3a904bbc..cdf418b2 100644
--- a/library/server/obsolete/v0/ewsgi/ewsgi-safe.ecf
+++ b/library/server/obsolete/v0/ewsgi/ewsgi-safe.ecf
@@ -1,27 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/ewsgi/ewsgi.ecf b/library/server/obsolete/v0/ewsgi/ewsgi.ecf
index 4e0c04f4..315ad1f8 100644
--- a/library/server/obsolete/v0/ewsgi/ewsgi.ecf
+++ b/library/server/obsolete/v0/ewsgi/ewsgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/obsolete/v0/wsf/connector/libfcgi-safe.ecf b/library/server/obsolete/v0/wsf/connector/libfcgi-safe.ecf
index ed09ba53..2eab6b8b 100644
--- a/library/server/obsolete/v0/wsf/connector/libfcgi-safe.ecf
+++ b/library/server/obsolete/v0/wsf/connector/libfcgi-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/connector/libfcgi.ecf b/library/server/obsolete/v0/wsf/connector/libfcgi.ecf
index 8202c47a..3db51d3f 100644
--- a/library/server/obsolete/v0/wsf/connector/libfcgi.ecf
+++ b/library/server/obsolete/v0/wsf/connector/libfcgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/obsolete/v0/wsf/connector/nino-safe.ecf b/library/server/obsolete/v0/wsf/connector/nino-safe.ecf
index b3d46573..e2e1a2f6 100644
--- a/library/server/obsolete/v0/wsf/connector/nino-safe.ecf
+++ b/library/server/obsolete/v0/wsf/connector/nino-safe.ecf
@@ -1,26 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/connector/nino.ecf b/library/server/obsolete/v0/wsf/connector/nino.ecf
index ba0da66e..984d312d 100644
--- a/library/server/obsolete/v0/wsf/connector/nino.ecf
+++ b/library/server/obsolete/v0/wsf/connector/nino.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,11 @@
/\.git$
/\.svn$
-
-
+
+
+
diff --git a/library/server/obsolete/v0/wsf/default/libfcgi-safe.ecf b/library/server/obsolete/v0/wsf/default/libfcgi-safe.ecf
index cebdfea7..5a38a136 100644
--- a/library/server/obsolete/v0/wsf/default/libfcgi-safe.ecf
+++ b/library/server/obsolete/v0/wsf/default/libfcgi-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/default/libfcgi.ecf b/library/server/obsolete/v0/wsf/default/libfcgi.ecf
index da05ddba..7a18364b 100644
--- a/library/server/obsolete/v0/wsf/default/libfcgi.ecf
+++ b/library/server/obsolete/v0/wsf/default/libfcgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/obsolete/v0/wsf/default/nino-safe.ecf b/library/server/obsolete/v0/wsf/default/nino-safe.ecf
index 4937ce34..33066aeb 100644
--- a/library/server/obsolete/v0/wsf/default/nino-safe.ecf
+++ b/library/server/obsolete/v0/wsf/default/nino-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/default/nino.ecf b/library/server/obsolete/v0/wsf/default/nino.ecf
index ce4bb3e8..553a55cc 100644
--- a/library/server/obsolete/v0/wsf/default/nino.ecf
+++ b/library/server/obsolete/v0/wsf/default/nino.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,11 @@
/\.git$
/\.svn$
-
-
+
+
+
diff --git a/library/server/obsolete/v0/wsf/wsf-safe.ecf b/library/server/obsolete/v0/wsf/wsf-safe.ecf
index 10a2f70d..973557d5 100644
--- a/library/server/obsolete/v0/wsf/wsf-safe.ecf
+++ b/library/server/obsolete/v0/wsf/wsf-safe.ecf
@@ -1,38 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /policy_driven$
-
-
-
-
-
- /service$
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/wsf.ecf b/library/server/obsolete/v0/wsf/wsf.ecf
index 624f3894..c355b705 100644
--- a/library/server/obsolete/v0/wsf/wsf.ecf
+++ b/library/server/obsolete/v0/wsf/wsf.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/obsolete/v0/wsf/wsf_extension-safe.ecf b/library/server/obsolete/v0/wsf/wsf_extension-safe.ecf
index a1713f43..97afc7e4 100644
--- a/library/server/obsolete/v0/wsf/wsf_extension-safe.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_extension-safe.ecf
@@ -1,21 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/wsf_extension.ecf b/library/server/obsolete/v0/wsf/wsf_extension.ecf
index 3fca1079..5a3ff809 100644
--- a/library/server/obsolete/v0/wsf/wsf_extension.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_extension.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/obsolete/v0/wsf/wsf_policy_driven-safe.ecf b/library/server/obsolete/v0/wsf/wsf_policy_driven-safe.ecf
index 84572b66..a9a6152f 100644
--- a/library/server/obsolete/v0/wsf/wsf_policy_driven-safe.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_policy_driven-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/wsf_policy_driven.ecf b/library/server/obsolete/v0/wsf/wsf_policy_driven.ecf
index 193a8db4..b7069cc6 100644
--- a/library/server/obsolete/v0/wsf/wsf_policy_driven.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_policy_driven.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/obsolete/v0/wsf/wsf_router_context-safe.ecf b/library/server/obsolete/v0/wsf/wsf_router_context-safe.ecf
index 9e53cd39..9b69e5a4 100644
--- a/library/server/obsolete/v0/wsf/wsf_router_context-safe.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_router_context-safe.ecf
@@ -1,17 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/wsf_router_context.ecf b/library/server/obsolete/v0/wsf/wsf_router_context.ecf
index 20cbe3f5..ad61c78c 100644
--- a/library/server/obsolete/v0/wsf/wsf_router_context.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_router_context.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/obsolete/v0/wsf/wsf_session-safe.ecf b/library/server/obsolete/v0/wsf/wsf_session-safe.ecf
index aa1b786b..124e8c6e 100644
--- a/library/server/obsolete/v0/wsf/wsf_session-safe.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_session-safe.ecf
@@ -1,21 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf/wsf_session.ecf b/library/server/obsolete/v0/wsf/wsf_session.ecf
index 4ed7951c..d4a0b365 100644
--- a/library/server/obsolete/v0/wsf/wsf_session.ecf
+++ b/library/server/obsolete/v0/wsf/wsf_session.ecf
@@ -1,21 +1,20 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
-
+
diff --git a/library/server/obsolete/v0/wsf_html/wsf_html-safe.ecf b/library/server/obsolete/v0/wsf_html/wsf_html-safe.ecf
index 8e8e2d21..06fb588c 100644
--- a/library/server/obsolete/v0/wsf_html/wsf_html-safe.ecf
+++ b/library/server/obsolete/v0/wsf_html/wsf_html-safe.ecf
@@ -1,22 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/obsolete/v0/wsf_html/wsf_html.ecf b/library/server/obsolete/v0/wsf_html/wsf_html.ecf
index 1677881f..5e0084a4 100644
--- a/library/server/obsolete/v0/wsf_html/wsf_html.ecf
+++ b/library/server/obsolete/v0/wsf_html/wsf_html.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/wsf/connector/all-safe.ecf b/library/server/wsf/connector/all-safe.ecf
index 8d3c51d0..c091dccd 100644
--- a/library/server/wsf/connector/all-safe.ecf
+++ b/library/server/wsf/connector/all-safe.ecf
@@ -1,27 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/connector/all.ecf b/library/server/wsf/connector/all.ecf
index 1381465f..1647840d 100644
--- a/library/server/wsf/connector/all.ecf
+++ b/library/server/wsf/connector/all.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/connector/cgi-safe.ecf b/library/server/wsf/connector/cgi-safe.ecf
index 9901295c..ea34f4b1 100644
--- a/library/server/wsf/connector/cgi-safe.ecf
+++ b/library/server/wsf/connector/cgi-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/connector/cgi.ecf b/library/server/wsf/connector/cgi.ecf
index 40566927..f13e5c75 100644
--- a/library/server/wsf/connector/cgi.ecf
+++ b/library/server/wsf/connector/cgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/connector/libfcgi-safe.ecf b/library/server/wsf/connector/libfcgi-safe.ecf
index 61eee5f3..e8b51ae9 100644
--- a/library/server/wsf/connector/libfcgi-safe.ecf
+++ b/library/server/wsf/connector/libfcgi-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/connector/libfcgi.ecf b/library/server/wsf/connector/libfcgi.ecf
index 2e4e9474..10e089d0 100644
--- a/library/server/wsf/connector/libfcgi.ecf
+++ b/library/server/wsf/connector/libfcgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/connector/nino-safe.ecf b/library/server/wsf/connector/nino-safe.ecf
index f58aa75e..dc8c98ba 100644
--- a/library/server/wsf/connector/nino-safe.ecf
+++ b/library/server/wsf/connector/nino-safe.ecf
@@ -1,26 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/connector/nino.ecf b/library/server/wsf/connector/nino.ecf
index c50711f2..1c6ad71e 100644
--- a/library/server/wsf/connector/nino.ecf
+++ b/library/server/wsf/connector/nino.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,11 @@
/\.git$
/\.svn$
-
-
+
+
+
diff --git a/library/server/wsf/connector/openshift-safe.ecf b/library/server/wsf/connector/openshift-safe.ecf
index cbcfd5cf..8ba051fc 100644
--- a/library/server/wsf/connector/openshift-safe.ecf
+++ b/library/server/wsf/connector/openshift-safe.ecf
@@ -1,19 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/connector/openshift.ecf b/library/server/wsf/connector/openshift.ecf
index 371275e3..9b7ce580 100644
--- a/library/server/wsf/connector/openshift.ecf
+++ b/library/server/wsf/connector/openshift.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/connector/standalone-safe.ecf b/library/server/wsf/connector/standalone-safe.ecf
index 6b884d46..cbc4f7f3 100644
--- a/library/server/wsf/connector/standalone-safe.ecf
+++ b/library/server/wsf/connector/standalone-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/connector/standalone.ecf b/library/server/wsf/connector/standalone.ecf
index c91e3b9a..2911e111 100644
--- a/library/server/wsf/connector/standalone.ecf
+++ b/library/server/wsf/connector/standalone.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,17 +7,16 @@
/\.git$
/\.svn$
-
-
-
+
-
+
-
+
diff --git a/library/server/wsf/connector/standalone/wsf_standalone_service_options.e b/library/server/wsf/connector/standalone/wsf_standalone_service_options.e
index b537ecf2..c3fa0c20 100644
--- a/library/server/wsf/connector/standalone/wsf_standalone_service_options.e
+++ b/library/server/wsf/connector/standalone/wsf_standalone_service_options.e
@@ -66,7 +66,7 @@ feature -- Access: connection
end
max_tcp_clients: INTEGER assign set_max_tcp_clients
- -- Listen on socket for at most `queue' connections.
+ -- Listen on socket for at most `max_tcp_clients' connections.
do
Result := option_integer_value ("max_tcp_clients", 0)
end
@@ -104,11 +104,26 @@ feature -- Access: persistent connection
-- Maximum number of requests allowed per persistent connection.
-- Recommended a high setting.
-- To disable KeepAlive, set `max_keep_alive_requests' to 0.
+ -- To have no limit, set `max_keep_alive_requests' to -1.
-- By default: {HTTPD_CONFIGURATION_I}.default_max_keep_alive_requests .
do
Result := option_integer_value ("max_keep_alive_requests", 0)
end
+ persistent_connection_disabled: BOOLEAN
+ -- Persistent connection disabled?
+ -- (or Keep-Alive disabled).
+ do
+ Result := max_keep_alive_requests = 0
+ end
+
+ has_unlimited_keep_alive_requests: BOOLEAN
+ -- Has unlimited count of keep alive requests.
+ -- i.e no limit of number of requests allowed per persistent connection.
+ do
+ Result := max_keep_alive_requests < 0
+ end
+
feature -- Access: SSL
is_secure: BOOLEAN assign set_is_secure
@@ -205,6 +220,16 @@ feature -- Element change
set_numeric_option ("max_keep_alive_requests", nb)
end
+ set_unlimited_keep_alive_requests
+ do
+ set_max_keep_alive_requests (-1)
+ end
+
+ disable_persistent_connection
+ do
+ set_max_keep_alive_requests (0)
+ end
+
set_is_secure (b: BOOLEAN)
-- Set secured connection enabled to `b'.
-- i.e if connection is using SSL/TLS.
diff --git a/library/server/wsf/connector/standalone_websocket-safe.ecf b/library/server/wsf/connector/standalone_websocket-safe.ecf
index e5d56d4d..b4d16f11 100644
--- a/library/server/wsf/connector/standalone_websocket-safe.ecf
+++ b/library/server/wsf/connector/standalone_websocket-safe.ecf
@@ -1,27 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/connector/standalone_websocket.ecf b/library/server/wsf/connector/standalone_websocket.ecf
index 1f8e054b..0c100d23 100644
--- a/library/server/wsf/connector/standalone_websocket.ecf
+++ b/library/server/wsf/connector/standalone_websocket.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/connector/standalone_websocket/websocket/event/web_socket_event_i.e b/library/server/wsf/connector/standalone_websocket/websocket/event/web_socket_event_i.e
index 500b266f..daff711c 100644
--- a/library/server/wsf/connector/standalone_websocket/websocket/event/web_socket_event_i.e
+++ b/library/server/wsf/connector/standalone_websocket/websocket/event/web_socket_event_i.e
@@ -88,6 +88,23 @@ feature -- Websocket events
deferred
end
+feature {WEB_SOCKET} -- Timeout.
+
+ timer_delay: INTEGER
+ -- Maximal duration in seconds between two `on_timeout` event.
+ -- Disable timeout event, by setting it to `0` (default).
+
+ set_timer_delay (nb_secs: INTEGER)
+ do
+ timer_delay := nb_secs
+ end
+
+ on_timer (ws: WEB_SOCKET)
+ -- Called every `timer_delay` seconds.
+ -- Note: redefine to use.
+ do
+ end
+
feature -- Websocket events: implemented
on_pong (ws: WEB_SOCKET; a_message: READABLE_STRING_8)
@@ -126,7 +143,7 @@ feature -- Websocket events: implemented
end
note
- copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
+ copyright: "2011-2017, 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/server/wsf/connector/standalone_websocket/websocket/web_socket.e b/library/server/wsf/connector/standalone_websocket/websocket/web_socket.e
index 6264a365..603a01f4 100644
--- a/library/server/wsf/connector/standalone_websocket/websocket/web_socket.e
+++ b/library/server/wsf/connector/standalone_websocket/websocket/web_socket.e
@@ -1,7 +1,7 @@
note
description: "[
Object representing the websocket connection.
- It contains the `request` and `response`, and more important the `socket` itself.
+ It contains internally the `request` and `response`, and more important the `socket` itself.
]"
date: "$Date$"
revision: "$Revision$"
@@ -10,16 +10,14 @@ class
WEB_SOCKET
inherit
+ WEB_SOCKET_WRITER
+
WGI_STANDALONE_CONNECTOR_EXPORTER
WSF_RESPONSE_EXPORTER
WGI_EXPORTER
- HTTPD_LOGGER_CONSTANTS
-
- WEB_SOCKET_CONSTANTS
-
SHARED_BASE64
create
@@ -32,7 +30,7 @@ feature {NONE} -- Initialization
request := req
response := res
is_verbose := False
- verbose_level := notice_level
+ verbose_level := {HTTPD_LOGGER_CONSTANTS}.notice_level
if
attached {WGI_STANDALONE_INPUT_STREAM} req.input as r_input
@@ -44,12 +42,7 @@ feature {NONE} -- Initialization
end
end
-feature -- Access
-
- socket: HTTPD_STREAM_SOCKET
- -- Underlying connected socket.
-
-feature {NONE} -- Access
+feature {NONE} -- Access
request: WSF_REQUEST
-- Associated request.
@@ -75,14 +68,7 @@ feature -- Status
has_error: BOOLEAN
-- Error occured during processing?
-feature -- Socket status
-
- is_ready_for_reading: BOOLEAN
- -- Is `socket' ready for reading?
- --| at this point, socket should be set to blocking.
- do
- Result := socket.ready_for_reading
- end
+feature -- Status report
is_open_read: BOOLEAN
-- Is `socket' open for reading?
@@ -96,12 +82,6 @@ feature -- Socket status
Result := socket.is_open_write
end
- socket_descriptor: INTEGER
- -- Descriptor for current `socket'.
- do
- Result := socket.descriptor
- end
-
feature -- Element change
set_is_verbose (b: BOOLEAN)
@@ -129,7 +109,7 @@ feature -- Basic operation
end
end
-feature -- Basic Operation
+feature {WSF_WEBSOCKET_EXECUTION} -- Basic Operation
open_ws_handshake
-- The opening handshake is intended to be compatible with HTTP-based
@@ -164,10 +144,10 @@ feature -- Basic Operation
-- TODO extract to a validator handshake or something like that.
if is_verbose then
- log ("%NReceive <====================", debug_level)
+ log ("%NReceive <====================", {HTTPD_LOGGER_CONSTANTS}.debug_level)
if attached req.raw_header_data as rhd then
check raw_header_is_valid_as_string_8: rhd.is_valid_as_string_8 end
- log (rhd.to_string_8, debug_level)
+ log (rhd.to_string_8, {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
end
if
@@ -186,7 +166,7 @@ feature -- Basic Operation
attached req.http_host -- Host header must be present
then
if is_verbose then
- log ("key " + l_ws_key, debug_level)
+ log ("key " + l_ws_key, {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
-- Sending the server's opening handshake
create l_sha1.make
@@ -198,9 +178,9 @@ feature -- Basic Operation
res.header.add_header_key_value ("Sec-WebSocket-Accept", l_key)
if is_verbose then
- log ("%N================> Send Handshake", debug_level)
+ log ("%N================> Send Handshake", {HTTPD_LOGGER_CONSTANTS}.debug_level)
if attached {HTTP_HEADER} res.header as h then
- log (h.string, debug_level)
+ log (h.string, {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
end
res.set_status_code_with_reason_phrase (101, "Switching Protocols")
@@ -208,7 +188,7 @@ feature -- Basic Operation
else
has_error := True
if is_verbose then
- log ("Error (opening_handshake)!!!", debug_level)
+ log ("Error (opening_handshake)!!!", {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
-- If we cannot complete the handshake, then the server MUST stop processing the client's handshake and return an HTTP response with an
-- appropriate error code (such as 400 Bad Request).
@@ -219,80 +199,77 @@ feature -- Basic Operation
end
end
-feature -- Response!
+feature {WEB_SOCKET_HANDLER} -- Networking
- send (a_opcode:INTEGER; a_message: READABLE_STRING_8)
+ socket: HTTPD_STREAM_SOCKET
+ -- Underlying connected socket.
+
+ has_input: BOOLEAN
+ -- Set by `wait_for_input`.
+
+ wait_for_input (cb: detachable WEB_SOCKET_EVENT_I)
local
- i: INTEGER
- l_chunk_size: INTEGER
- l_chunk: READABLE_STRING_8
- l_header_message: STRING
- l_message_count: INTEGER
- n: NATURAL_64
- retried: BOOLEAN
+ l_timeout, nb: INTEGER
+ l_cb_timeout: INTEGER
do
- debug ("ws")
- print (">>do_send (..., "+ opcode_name (a_opcode) +", ..)%N")
- end
- if not retried then
- create l_header_message.make_empty
- l_header_message.append_code ((0x80 | a_opcode).to_natural_32)
- l_message_count := a_message.count
- n := l_message_count.to_natural_64
- if l_message_count > 0xffff then
- --! Improve. this code needs to be checked.
- l_header_message.append_code ((0 | 127).to_natural_32)
- l_header_message.append_character ((n |>> 56).to_character_8)
- l_header_message.append_character ((n |>> 48).to_character_8)
- l_header_message.append_character ((n |>> 40).to_character_8)
- l_header_message.append_character ((n |>> 32).to_character_8)
- l_header_message.append_character ((n |>> 24).to_character_8)
- l_header_message.append_character ((n |>> 16).to_character_8)
- l_header_message.append_character ((n |>> 8).to_character_8)
- l_header_message.append_character ( n.to_character_8)
- elseif l_message_count > 125 then
- l_header_message.append_code ((0 | 126).to_natural_32)
- l_header_message.append_code ((n |>> 8).as_natural_32)
- l_header_message.append_character (n.to_character_8)
+ has_input := False
+ if cb = Void then
+ has_input := socket.ready_for_reading
+ else
+ l_cb_timeout := cb.timer_delay
+ l_timeout := socket.timeout
+ if l_cb_timeout = 0 then
+ -- timeout event not enabled.
+ has_input := socket.ready_for_reading
else
- l_header_message.append_code (n.as_natural_32)
- end
- socket.put_string_8_noexception (l_header_message)
- if not socket.was_error then
- l_chunk_size := 16_384 -- 16K TODO: see if we should make it customizable.
- if l_message_count < l_chunk_size then
- socket.put_string_8_noexception (a_message)
+ cb.on_timer (Current)
+ if l_cb_timeout > l_timeout then
+ -- event timeout duration is bigger than socket timeout
+ -- thus, no on_timeout before next frame waiting
+ has_input := socket.ready_for_reading
else
from
- i := 0
+ l_timeout := socket.timeout
+ nb := l_timeout
+ socket.set_timeout (l_cb_timeout) -- FIXME: for now 1 sec is the smaller timeout we can use.
until
- l_chunk_size = 0 or socket.was_error
+ has_input or nb <= 0
loop
- debug ("ws")
- print ("Sending chunk " + (i + 1).out + " -> " + (i + l_chunk_size).out +" / " + l_message_count.out + "%N")
+ has_input := socket.ready_for_reading
+ if not has_input then
+ -- Call on_timeout only if there is no input,
+ -- otherwise it was called once before the initial wait.
+ socket.set_timeout (l_timeout)
+ cb.on_timer (Current)
+ socket.set_timeout (l_cb_timeout)
end
- l_chunk := a_message.substring (i + 1, l_message_count.min (i + l_chunk_size))
- socket.put_string_8_noexception (l_chunk)
- if l_chunk.count < l_chunk_size then
- l_chunk_size := 0
- end
- i := i + l_chunk_size
- end
- debug ("ws")
- print ("Sending chunk done%N")
+ nb := nb - l_cb_timeout
end
+ socket.set_timeout (l_timeout)
end
end
-
- else
- -- FIXME: what should be done on rescue?
end
- rescue
- retried := True
- io.put_string ("Internal error in " + generator + ".do_send (conn, a_opcode=" + a_opcode.out + ", a_message) !%N")
- retry
end
+
+ socket_descriptor: INTEGER
+ -- Descriptor for current `socket'.
+ do
+ Result := socket.descriptor
+ end
+
+ socket_put_string (s: READABLE_STRING_8)
+ do
+ socket.put_string_8_noexception (s)
+ end
+
+ socket_was_error: BOOLEAN
+ do
+ Result := socket.was_error
+ end
+
+feature {WEB_SOCKET_HANDLER} -- Frame
+
next_frame: detachable WEB_SOCKET_FRAME
-- TODO Binary messages
-- Handle error responses in a better way.
@@ -402,7 +379,7 @@ feature -- Response!
if Result.is_valid then
--| valid frame/fragment
if is_verbose then
- log ("+ frame " + opcode_name (l_opcode) + " (fin=" + l_fin.out + ")", debug_level)
+ log ("+ frame " + opcode_name (l_opcode) + " (fin=" + l_fin.out + ")", {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
-- rsv validation
@@ -420,7 +397,7 @@ feature -- Response!
end
else
if is_verbose then
- log ("+ INVALID frame " + opcode_name (l_opcode) + " (fin=" + l_fin.out + ")", debug_level)
+ log ("+ INVALID frame " + opcode_name (l_opcode) + " (fin=" + l_fin.out + ")", {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
end
@@ -548,7 +525,7 @@ feature -- Response!
end
end
if is_verbose then
- log (" Received " + l_fetch_count.out + " out of " + l_len.out + " bytes <===============", debug_level)
+ log (" Received " + l_fetch_count.out + " out of " + l_len.out + " bytes <===============", {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
debug ("ws")
print (" -> ")
@@ -580,7 +557,7 @@ feature -- Response!
if Result /= Void then
if attached Result.error as err then
if is_verbose then
- log (" !Invalid frame: " + err.string, debug_level)
+ log (" !Invalid frame: " + err.string, {HTTPD_LOGGER_CONSTANTS}.debug_level)
end
end
if Result.is_injected_control then
@@ -624,8 +601,7 @@ feature -- Response!
retry
end
-
-feature -- Encoding
+feature {NONE} -- Encoding
digest (a_sha1: SHA1): STRING
-- Digest of `a_sha1'.
@@ -672,7 +648,7 @@ feature {NONE} -- Socket helpers
end
end
-feature -- Masking Data Client - Server
+feature {NONE} -- Masking Data Client - Server
unmask (a_chunk: STRING_8; a_pos: INTEGER; a_key: READABLE_STRING_8)
local
@@ -795,7 +771,6 @@ feature {NONE} -- Debug
end
end
-
note
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
diff --git a/library/server/wsf/connector/standalone_websocket/websocket/web_socket_handler.e b/library/server/wsf/connector/standalone_websocket/websocket/web_socket_handler.e
index 5268c600..ce274021 100644
--- a/library/server/wsf/connector/standalone_websocket/websocket/web_socket_handler.e
+++ b/library/server/wsf/connector/standalone_websocket/websocket/web_socket_handler.e
@@ -59,7 +59,8 @@ feature -- Execution
debug ("dbglog")
dbglog (generator + ".execute_websocket (loop) WS_REQUEST_HANDLER.process_request {" + ws.socket_descriptor.out + "}")
end
- if ws.is_ready_for_reading then
+ ws.wait_for_input (callbacks)
+ if ws.has_input then
l_frame := ws.next_frame
if l_frame /= Void and then l_frame.is_valid then
if attached l_frame.injected_control_frames as l_injections then
@@ -140,7 +141,7 @@ feature {NONE} -- Logging
end
note
- copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
+ copyright: "2011-2017, 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/server/wsf/connector/standalone_websocket/websocket/web_socket_writer.e b/library/server/wsf/connector/standalone_websocket/websocket/web_socket_writer.e
new file mode 100644
index 00000000..229afaa8
--- /dev/null
+++ b/library/server/wsf/connector/standalone_websocket/websocket/web_socket_writer.e
@@ -0,0 +1,131 @@
+note
+ description: "Summary description for {WEB_SOCKET_WRITER}."
+ date: "$Date$"
+ revision: "$Revision$"
+
+deferred class
+ WEB_SOCKET_WRITER
+
+inherit
+ WEB_SOCKET_CONSTANTS
+
+feature -- Messages
+
+ send_text (a_message: READABLE_STRING_8)
+ -- Send text frame `a_message`.
+ do
+ send (text_frame, a_message)
+ end
+
+ send_connection_close (a_message: detachable READABLE_STRING_8)
+ -- Send connection close frame `a_message`.
+ do
+ send (connection_close_frame, a_message)
+ end
+
+ send_binary (a_data: READABLE_STRING_8)
+ -- Send binary frame `a_data`.
+ do
+ send (Binary_frame, a_data)
+ end
+
+feature -- Custom Message
+
+ send (a_opcode: INTEGER; a_message: detachable READABLE_STRING_8)
+ local
+ i: INTEGER
+ l_chunk_size: INTEGER
+ l_chunk: READABLE_STRING_8
+ l_header_message: STRING
+ l_message_count: INTEGER
+ n: NATURAL_64
+ retried: BOOLEAN
+ do
+ debug ("ws")
+ print (">>do_send (..., "+ opcode_name (a_opcode) +", ..)%N")
+ end
+ if not retried then
+ create l_header_message.make_empty
+ l_header_message.append_code ((0x80 | a_opcode).to_natural_32)
+ if a_message /= Void then
+ l_message_count := a_message.count
+ else
+ l_message_count := 0
+ end
+ n := l_message_count.to_natural_64
+ if l_message_count > 0xffff then
+ --! Improve. this code needs to be checked.
+ l_header_message.append_code ((0 | 127).to_natural_32)
+ l_header_message.append_character ((n |>> 56).to_character_8)
+ l_header_message.append_character ((n |>> 48).to_character_8)
+ l_header_message.append_character ((n |>> 40).to_character_8)
+ l_header_message.append_character ((n |>> 32).to_character_8)
+ l_header_message.append_character ((n |>> 24).to_character_8)
+ l_header_message.append_character ((n |>> 16).to_character_8)
+ l_header_message.append_character ((n |>> 8).to_character_8)
+ l_header_message.append_character ( n.to_character_8)
+ elseif l_message_count > 125 then
+ l_header_message.append_code ((0 | 126).to_natural_32)
+ l_header_message.append_code ((n |>> 8).as_natural_32)
+ l_header_message.append_character (n.to_character_8)
+ else
+ l_header_message.append_code (n.as_natural_32)
+ end
+ socket_put_string (l_header_message)
+ if not socket_was_error then
+ l_chunk_size := 16_384 -- 16K TODO: see if we should make it customizable.
+ if a_message = Void or else l_message_count < l_chunk_size then
+ if a_message /= Void then
+ socket_put_string (a_message)
+ end
+ else
+ from
+ i := 0
+ until
+ l_chunk_size = 0 or socket_was_error
+ loop
+ debug ("ws")
+ print ("Sending chunk " + (i + 1).out + " -> " + (i + l_chunk_size).out +" / " + l_message_count.out + "%N")
+ end
+ l_chunk := a_message.substring (i + 1, l_message_count.min (i + l_chunk_size))
+ socket_put_string (l_chunk)
+ if l_chunk.count < l_chunk_size then
+ l_chunk_size := 0
+ end
+ i := i + l_chunk_size
+ end
+ debug ("ws")
+ print ("Sending chunk done%N")
+ end
+ end
+ end
+ else
+ -- FIXME: what should be done on rescue?
+ end
+ rescue
+ retried := True
+ io.put_string ("Internal error in " + generator + ".do_send (conn, a_opcode=" + a_opcode.out + ", a_message) !%N")
+ retry
+ end
+
+feature {NONE} -- Networking
+
+ socket_put_string (s: READABLE_STRING_8)
+ deferred
+ end
+
+ socket_was_error: BOOLEAN
+ deferred
+ end
+
+note
+ copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
+ license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
+ source: "[
+ Eiffel Software
+ 5949 Hollister Ave., Goleta, CA 93117 USA
+ Telephone 805-685-1006, Fax 805-685-6869
+ Website http://www.eiffel.com
+ Customer support http://support.eiffel.com
+ ]"
+end
diff --git a/library/server/wsf/default/cgi-safe.ecf b/library/server/wsf/default/cgi-safe.ecf
index bcc72eb5..1f48606e 100644
--- a/library/server/wsf/default/cgi-safe.ecf
+++ b/library/server/wsf/default/cgi-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/default/cgi.ecf b/library/server/wsf/default/cgi.ecf
index 7105b945..5ec4d21c 100644
--- a/library/server/wsf/default/cgi.ecf
+++ b/library/server/wsf/default/cgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/default/libfcgi-safe.ecf b/library/server/wsf/default/libfcgi-safe.ecf
index 3cd633cc..1d8e00ed 100644
--- a/library/server/wsf/default/libfcgi-safe.ecf
+++ b/library/server/wsf/default/libfcgi-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/default/libfcgi.ecf b/library/server/wsf/default/libfcgi.ecf
index d17bdb43..b03d051f 100644
--- a/library/server/wsf/default/libfcgi.ecf
+++ b/library/server/wsf/default/libfcgi.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/default/nino-safe.ecf b/library/server/wsf/default/nino-safe.ecf
index 08138562..8a9c3119 100644
--- a/library/server/wsf/default/nino-safe.ecf
+++ b/library/server/wsf/default/nino-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/default/nino.ecf b/library/server/wsf/default/nino.ecf
index f5ced01e..f9e891ea 100644
--- a/library/server/wsf/default/nino.ecf
+++ b/library/server/wsf/default/nino.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,11 @@
/\.git$
/\.svn$
-
-
+
+
+
diff --git a/library/server/wsf/default/openshift-safe.ecf b/library/server/wsf/default/openshift-safe.ecf
index 566a353f..b8dd8023 100644
--- a/library/server/wsf/default/openshift-safe.ecf
+++ b/library/server/wsf/default/openshift-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/default/openshift.ecf b/library/server/wsf/default/openshift.ecf
index bb1624ed..ca75cc8f 100644
--- a/library/server/wsf/default/openshift.ecf
+++ b/library/server/wsf/default/openshift.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,8 @@
/\.git$
/\.svn$
-
-
diff --git a/library/server/wsf/default/standalone-safe.ecf b/library/server/wsf/default/standalone-safe.ecf
index 31c70da1..d3ae971f 100644
--- a/library/server/wsf/default/standalone-safe.ecf
+++ b/library/server/wsf/default/standalone-safe.ecf
@@ -1,18 +1,3 @@
-
-
-
-
- /EIFGENs$
- /\.git$
- /\.svn$
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/default/standalone.ecf b/library/server/wsf/default/standalone.ecf
index 84285953..28f22cf8 100644
--- a/library/server/wsf/default/standalone.ecf
+++ b/library/server/wsf/default/standalone.ecf
@@ -1,5 +1,5 @@
-
+
@@ -7,11 +7,10 @@
/\.git$
/\.svn$
-
-
-
+
diff --git a/library/server/wsf/package.iron b/library/server/wsf/package.iron
index f766b25f..702947af 100644
--- a/library/server/wsf/package.iron
+++ b/library/server/wsf/package.iron
@@ -1,40 +1,32 @@
-
package wsf
project
- wsf = "wsf-safe.ecf"
wsf = "wsf.ecf"
- wsf_extension = "wsf_extension-safe.ecf"
wsf_extension = "wsf_extension.ecf"
- wsf_policy_driven = "wsf_policy_driven-safe.ecf"
wsf_policy_driven = "wsf_policy_driven.ecf"
- wsf_router_context = "wsf_router_context-safe.ecf"
wsf_router_context = "wsf_router_context.ecf"
- wsf_session = "wsf_session-safe.ecf"
wsf_session = "wsf_session.ecf"
- wsf_cgi = "connector/cgi-safe.ecf"
wsf_cgi = "connector/cgi.ecf"
- wsf_libfcgi = "connector/libfcgi-safe.ecf"
wsf_libfcgi = "connector/libfcgi.ecf"
- wsf_openshift = "connector/openshift-safe.ecf"
- default_cgi = "default/cgi-safe.ecf"
default_cgi = "default/cgi.ecf"
- default_libfcgi = "default/libfcgi-safe.ecf"
default_libfcgi = "default/libfcgi.ecf"
- default_openshift = "default/openshift-safe.ecf"
- wsf_standalone = "connector/standalone-safe.ecf"
+ default_openshift = "default/openshift.ecf"
wsf_standalone = "connector/standalone.ecf"
- default_standalone = "default/standalone-safe.ecf"
default_standalone = "default/standalone.ecf"
-
+ wsf_all = "connector/all.ecf"
+ wsf_nino = "connector/nino.ecf"
+ wsf_openshift = "connector/openshift.ecf"
+ wsf_standalone_websocket = "connector/standalone_websocket.ecf"
+ default_nino = "default/nino.ecf"
note
title: Web Server Foundation
description: "[
- Core of the Eiffel Web Framework (EWF).
- Provide the request, response, router, ... interfaces.
- The foundation to build web server application.
- ]"
+Core of the Eiffel Web Framework (EWF).
+Provide the request, response, router, ... interfaces.
+The foundation to build web server application.
+ ]"
+
tags: ewf,server,httpd,request,connector,web
collection: EWF
copyright: 2011-2016, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others
@@ -44,4 +36,3 @@ note
link[doc]: "Documentation" http://eiffelwebframework.github.io/EWF/
end
-
diff --git a/library/server/wsf/tests/echo/echo-safe.ecf b/library/server/wsf/tests/echo/echo-safe.ecf
deleted file mode 100644
index 9146db93..00000000
--- a/library/server/wsf/tests/echo/echo-safe.ecf
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/server/wsf/tests/echo/echo.ecf b/library/server/wsf/tests/echo/echo.ecf
new file mode 100644
index 00000000..b7801895
--- /dev/null
+++ b/library/server/wsf/tests/echo/echo.ecf
@@ -0,0 +1,20 @@
+
+
+
+
+
+ /\.git$
+ /\.svn$
+ /EIFGENs$
+
+
+
+
+
+
+
+
+
+
+
diff --git a/library/server/wsf/tests/tests-safe.ecf b/library/server/wsf/tests/tests-safe.ecf
deleted file mode 100644
index ee1252ee..00000000
--- a/library/server/wsf/tests/tests-safe.ecf
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/server/wsf/tests/tests.ecf b/library/server/wsf/tests/tests.ecf
index dc13d593..0f2564c8 100644
--- a/library/server/wsf/tests/tests.ecf
+++ b/library/server/wsf/tests/tests.ecf
@@ -1,25 +1,32 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
-
+
+
+
-
-
-
+
+
+
+
diff --git a/library/server/wsf/wsf-safe.ecf b/library/server/wsf/wsf-safe.ecf
index 58e2b2ba..711dab71 100644
--- a/library/server/wsf/wsf-safe.ecf
+++ b/library/server/wsf/wsf-safe.ecf
@@ -1,32 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /policy_driven$
-
-
-
-
-
+
+
diff --git a/library/server/wsf/wsf.ecf b/library/server/wsf/wsf.ecf
index 58b50f1b..231927ad 100644
--- a/library/server/wsf/wsf.ecf
+++ b/library/server/wsf/wsf.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/wsf/wsf_extension-safe.ecf b/library/server/wsf/wsf_extension-safe.ecf
index f7e5884e..2355bb81 100644
--- a/library/server/wsf/wsf_extension-safe.ecf
+++ b/library/server/wsf/wsf_extension-safe.ecf
@@ -1,21 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/wsf_extension.ecf b/library/server/wsf/wsf_extension.ecf
index 373a3633..ddc5a1dc 100644
--- a/library/server/wsf/wsf_extension.ecf
+++ b/library/server/wsf/wsf_extension.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/wsf/wsf_policy_driven-safe.ecf b/library/server/wsf/wsf_policy_driven-safe.ecf
index 94858f09..463bf231 100644
--- a/library/server/wsf/wsf_policy_driven-safe.ecf
+++ b/library/server/wsf/wsf_policy_driven-safe.ecf
@@ -1,23 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/wsf_policy_driven.ecf b/library/server/wsf/wsf_policy_driven.ecf
index b7fc8486..6f497e64 100644
--- a/library/server/wsf/wsf_policy_driven.ecf
+++ b/library/server/wsf/wsf_policy_driven.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/wsf/wsf_router_context-safe.ecf b/library/server/wsf/wsf_router_context-safe.ecf
index 729ad6d4..9256a9da 100644
--- a/library/server/wsf/wsf_router_context-safe.ecf
+++ b/library/server/wsf/wsf_router_context-safe.ecf
@@ -1,17 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/wsf_router_context.ecf b/library/server/wsf/wsf_router_context.ecf
index 7d03a0d2..fad284c7 100644
--- a/library/server/wsf/wsf_router_context.ecf
+++ b/library/server/wsf/wsf_router_context.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/wsf/wsf_session-safe.ecf b/library/server/wsf/wsf_session-safe.ecf
index b2d5d9c9..124e8c6e 100644
--- a/library/server/wsf/wsf_session-safe.ecf
+++ b/library/server/wsf/wsf_session-safe.ecf
@@ -1,21 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf/wsf_session.ecf b/library/server/wsf/wsf_session.ecf
index 860caff5..d920e934 100644
--- a/library/server/wsf/wsf_session.ecf
+++ b/library/server/wsf/wsf_session.ecf
@@ -1,21 +1,20 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
-
+
diff --git a/library/server/wsf_html/form/field/wsf_form_textarea.e b/library/server/wsf_html/form/field/wsf_form_textarea.e
index 78073a11..fda39679 100644
--- a/library/server/wsf_html/form/field/wsf_form_textarea.e
+++ b/library/server/wsf_html/form/field/wsf_form_textarea.e
@@ -22,7 +22,7 @@ feature {NONE} -- Initialization
feature -- Access
- default_value: detachable READABLE_STRING_GENERAL
+ default_value: detachable READABLE_STRING_32
rows: INTEGER
@@ -54,9 +54,13 @@ feature -- Element change
end
end
- set_default_value (v: like default_value)
+ set_default_value (v: detachable READABLE_STRING_GENERAL)
do
- default_value := v
+ if v = Void then
+ default_value := Void
+ else
+ default_value := v.as_string_32
+ end
end
feature -- Conversion
diff --git a/library/server/wsf_html/form/wsf_form_composite.e b/library/server/wsf_html/form/wsf_form_composite.e
index b3b9ca4b..1df452d4 100644
--- a/library/server/wsf_html/form/wsf_form_composite.e
+++ b/library/server/wsf_html/form/wsf_form_composite.e
@@ -1,8 +1,7 @@
note
- description : "Objects that ..."
- author : "$Author$"
- date : "$Date$"
- revision : "$Revision$"
+ description : "Objects containing widget WSF_WIDGET objects, and add specific form support (notion of form fields)."
+ date: "$Date$"
+ revision: "$Revision$"
deferred class
WSF_FORM_COMPOSITE
diff --git a/library/server/wsf_html/form/wsf_form_data.e b/library/server/wsf_html/form/wsf_form_data.e
index dce571af..644e2f0a 100644
--- a/library/server/wsf_html/form/wsf_form_data.e
+++ b/library/server/wsf_html/form/wsf_form_data.e
@@ -48,7 +48,9 @@ feature -- Access
item (a_name: READABLE_STRING_GENERAL): detachable WSF_VALUE
do
- Result := items.item (a_name.as_string_8)
+ if a_name.is_valid_as_string_8 then
+ Result := items.item (a_name.to_string_8)
+ end
end
string_item (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
diff --git a/library/server/wsf_html/form/wsf_form_field_with_numeric_attribute.e b/library/server/wsf_html/form/wsf_form_field_with_numeric_attribute.e
index 7745ce06..7226f861 100644
--- a/library/server/wsf_html/form/wsf_form_field_with_numeric_attribute.e
+++ b/library/server/wsf_html/form/wsf_form_field_with_numeric_attribute.e
@@ -39,7 +39,7 @@ feature -- Element Change
set_max (a_val: INTEGER)
-- Set `max' with `a_val'.
do
- set_max_string(a_val.out)
+ set_max_string (a_val.out)
ensure
max_set: attached max as l_max implies l_max.same_string (a_val.out)
end
@@ -94,7 +94,6 @@ feature -- Element Change
step_set: attached step as l_step implies l_step.same_string_general (a_val)
end
-
feature {NONE} -- Conversion
append_numeric_input_attributes_to (a_target: STRING)
@@ -103,7 +102,7 @@ feature {NONE} -- Conversion
--min
if attached min as l_min then
a_target.append (" min=%"")
- a_target.append(l_min)
+ a_target.append (l_min)
a_target.append_character ('%"')
end
diff --git a/library/server/wsf_html/form/wsf_form_input.e b/library/server/wsf_html/form/wsf_form_input.e
index 035c7410..d8e5434e 100644
--- a/library/server/wsf_html/form/wsf_form_input.e
+++ b/library/server/wsf_html/form/wsf_form_input.e
@@ -19,7 +19,7 @@ feature {NONE} -- Initialization
name := a_name
end
- make_with_text (a_name: like name; a_text: READABLE_STRING_32)
+ make_with_text (a_name: like name; a_text: READABLE_STRING_GENERAL)
do
make (a_name)
set_text_value (a_text)
@@ -44,7 +44,7 @@ feature -- Access
feature -- Element change
- set_text_value (s: detachable READABLE_STRING_32)
+ set_text_value (s: detachable READABLE_STRING_GENERAL)
do
set_default_value (s)
end
@@ -73,9 +73,13 @@ feature -- Element change
end
end
- set_default_value (v: like default_value)
+ set_default_value (v: detachable READABLE_STRING_GENERAL)
do
- default_value := v
+ if v = Void then
+ default_value := Void
+ else
+ default_value := v.as_string_32
+ end
end
feature -- Conversion
diff --git a/library/server/wsf_html/form/wsf_form_input_with_html5.e b/library/server/wsf_html/form/wsf_form_input_with_html5.e
index 604b2086..97b8f521 100644
--- a/library/server/wsf_html/form/wsf_form_input_with_html5.e
+++ b/library/server/wsf_html/form/wsf_form_input_with_html5.e
@@ -35,12 +35,17 @@ feature -- Access
feature -- Change element
- set_placeholder (a_placeholder: READABLE_STRING_32)
+ set_placeholder (a_placeholder: detachable READABLE_STRING_GENERAL)
-- Set `placeholder' with `a_placeholder'.
do
- placeholder := a_placeholder
+ if a_placeholder = Void then
+ placeholder := Void
+ else
+ placeholder := a_placeholder.as_string_32
+ end
ensure
- placeholder_set: attached placeholder as l_placeholder implies l_placeholder = a_placeholder
+ placeholder_set: (a_placeholder = Void implies placeholder = Void)
+ or (a_placeholder /= Void implies (attached placeholder as l_placeholder and then a_placeholder.same_string (l_placeholder)))
end
enable_autofocus
@@ -91,16 +96,21 @@ feature -- Change element
required_flase: not required
end
- set_pattern (a_pattern: READABLE_STRING_32)
+ set_pattern (a_pattern: READABLE_STRING_GENERAL)
-- Set `pattern' with `a_pattern'.
-- Example:[0-9][A-Z]{3}
-- Check HTML5 patterns site.
note
EIS: "name=HTML5 Patterns", "src=http://html5pattern.com/"
do
- pattern := a_pattern
+ if a_pattern = Void then
+ pattern := Void
+ else
+ pattern := a_pattern.as_string_32
+ end
ensure
- pattern_set: attached pattern as l_pattern implies l_pattern = a_pattern
+ pattern_set: (a_pattern = Void implies pattern = Void) or
+ a_pattern /= Void implies attached pattern as l_pattern and then a_pattern.same_string (l_pattern)
end
diff --git a/library/server/wsf_html/form/wsf_form_with_alternative_actions.e b/library/server/wsf_html/form/wsf_form_with_alternative_actions.e
index e43f9d7d..eb65c07c 100644
--- a/library/server/wsf_html/form/wsf_form_with_alternative_actions.e
+++ b/library/server/wsf_html/form/wsf_form_with_alternative_actions.e
@@ -43,7 +43,6 @@ feature -- Access
feature -- Element Change
-
set_formnovalidate
-- Set formnovalidate to True.
do
@@ -60,49 +59,69 @@ feature -- Element Change
formnovalidate_false: not formnovalidate
end
- set_formaction (a_action: READABLE_STRING_GENERAL)
+ set_formaction (a_action: detachable READABLE_STRING_GENERAL)
-- Set `formaction' with `a_action'.
-- Example:
require
- is_valid_as_string_8: a_action.is_valid_as_string_8
+ is_valid_as_string_8: a_action /= Void implies a_action.is_valid_as_string_8
do
- formaction := a_action.to_string_8
+ if a_action = Void then
+ formaction := Void
+ else
+ formaction := a_action.to_string_8
+ end
ensure
- formaction_set: attached formaction as l_action implies l_action = a_action
+ formaction_set: (a_action = Void implies formaction = Void)
+ or (a_action /= Void implies (attached formaction as l_action and then a_action.same_string (l_action)))
end
- set_formenctype (a_enctype: READABLE_STRING_GENERAL)
+ set_formenctype (a_enctype: detachable READABLE_STRING_GENERAL)
-- Set `formenctype' with `a_enctype'.
-- Example:
require
- is_valid_as_string_8: a_enctype.is_valid_as_string_8
+ is_valid_as_string_8: a_enctype /= Void implies a_enctype.is_valid_as_string_8
do
- formenctype := a_enctype.to_string_8
+ if a_enctype = Void then
+ formenctype := Void
+ else
+ formenctype := a_enctype.to_string_8
+ end
ensure
- formenctype_set: attached formenctype as l_enctype implies l_enctype = a_enctype
+ formenctype_set: (a_enctype = Void implies formenctype = Void)
+ or (a_enctype /= Void implies (attached formenctype as l_enctype and then a_enctype.same_string (l_enctype)))
end
- set_formmethod (a_method: READABLE_STRING_GENERAL)
+ set_formmethod (a_method: detachable READABLE_STRING_GENERAL)
-- Set `formmethod' with `a_method'.
-- Example:
--! require is_valid_method: [PUT, POST, DELETE, GET, ...]
require
- is_valid_as_string_8: a_method.is_valid_as_string_8
+ is_valid_as_string_8: a_method /= Void implies a_method.is_valid_as_string_8
do
- formmethod := a_method.to_string_8
+ if a_method = Void then
+ formmethod := Void
+ else
+ formmethod := a_method.to_string_8
+ end
ensure
- formmethod_set: attached formmethod as l_method implies l_method = a_method
+ formmethod_set: (a_method = Void implies formmethod = Void)
+ or (a_method /= Void implies (attached formmethod as l_method and then a_method.same_string (l_method)))
end
- set_formtarget (a_target: READABLE_STRING_GENERAL)
+ set_formtarget (a_target: detachable READABLE_STRING_GENERAL)
-- Set `formtarget' with `a_target'.
-- Example:
require
- is_valid_as_string_8: a_target.is_valid_as_string_8
+ is_valid_as_string_8: a_target /= Void implies a_target.is_valid_as_string_8
do
- formtarget := a_target.to_string_8
+ if a_target = Void then
+ formtarget := Void
+ else
+ formtarget := a_target.to_string_8
+ end
ensure
- formtarget_set: attached formtarget as l_target implies l_target = a_target
+ formtarget_set: (a_target = Void implies formtarget = Void)
+ or (a_target /= Void implies (attached formtarget as l_target and then a_target.same_string (l_target)))
end
diff --git a/library/server/wsf_html/widget/wsf_widget_composite.e b/library/server/wsf_html/widget/wsf_widget_composite.e
index eedcdafa..4cf11eec 100644
--- a/library/server/wsf_html/widget/wsf_widget_composite.e
+++ b/library/server/wsf_html/widget/wsf_widget_composite.e
@@ -1,8 +1,7 @@
note
- description : "Objects that ..."
- author : "$Author$"
- date : "$Date$"
- revision : "$Revision$"
+ description : "Objects containing WSF_WIDGET objects."
+ date: "$Date$"
+ revision: "$Revision$"
deferred class
WSF_WIDGET_COMPOSITE
diff --git a/library/server/wsf_html/wsf_html-safe.ecf b/library/server/wsf_html/wsf_html-safe.ecf
index 6e3f66f6..c495cf7b 100644
--- a/library/server/wsf_html/wsf_html-safe.ecf
+++ b/library/server/wsf_html/wsf_html-safe.ecf
@@ -1,22 +1,3 @@
-
-
-
-
- /.git$
- /.svn$
- /EIFGENs$
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/library/server/wsf_html/wsf_html.ecf b/library/server/wsf_html/wsf_html.ecf
index aa888960..d4c2e4f9 100644
--- a/library/server/wsf_html/wsf_html.ecf
+++ b/library/server/wsf_html/wsf_html.ecf
@@ -1,15 +1,14 @@
-
+
- /.git$
- /.svn$
+ /\.git$
+ /\.svn$
/EIFGENs$
-
-
diff --git a/library/server/wsf_proxy/wsf_proxy-safe.ecf b/library/server/wsf_proxy/wsf_proxy-safe.ecf
index edcb930b..8e606137 100644
--- a/library/server/wsf_proxy/wsf_proxy-safe.ecf
+++ b/library/server/wsf_proxy/wsf_proxy-safe.ecf
@@ -1,35 +1,3 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- no_ssl
- ssl
-
-
-
-