Compare commits
4 Commits
es_rev9833
...
unicode_fi
| Author | SHA1 | Date | |
|---|---|---|---|
| af8e278858 | |||
| b6129397a2 | |||
| 26b7052773 | |||
| 941281e3ed |
@@ -1,163 +0,0 @@
|
|||||||
EWF Deployment
|
|
||||||
==============
|
|
||||||
|
|
||||||
#Apache on Windows#
|
|
||||||
|
|
||||||
1. Apache Install
|
|
||||||
2. Deploying EWF CGI
|
|
||||||
3. CGI overview
|
|
||||||
1. Build EWF application
|
|
||||||
2. Copy the generated exe file and the www content .htaccess CGI
|
|
||||||
4. Deploying EWF FCGI
|
|
||||||
5. FCGI overview
|
|
||||||
1. Build EWF application
|
|
||||||
2. Copy the generated exe file and the www content.htaccess CGI
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##Apache on Windows
|
|
||||||
|
|
||||||
###Apache Install
|
|
||||||
|
|
||||||
>Check the correct version (Win 32 or Win64)
|
|
||||||
>Apache Version: Apache 2.4.4
|
|
||||||
>Windows: http://www.apachelounge.com/download/
|
|
||||||
|
|
||||||
####Deploying EWF CGI
|
|
||||||
|
|
||||||
####CGI overview
|
|
||||||
>A new process is started for each HTTP request. So if there are N requests to the same >CGI program, the code of the CGI program is loaded into memory N times.
|
|
||||||
>When a CGI program finishes handling a request, the program terminates.
|
|
||||||
|
|
||||||
* Build EWF application
|
|
||||||
|
|
||||||
ec -config [app.ecf] -target [app_cgi] -finalize -c_compile -project_path
|
|
||||||
|
|
||||||
|
|
||||||
>Note: change app.ecf and target app_cgi based on your own configuration.
|
|
||||||
|
|
||||||
* Copy the generated exe file and the www content
|
|
||||||
|
|
||||||
Copy the app.exe and the folder _www_ into a folder served by apache2, for example under.
|
|
||||||
|
|
||||||
|
|
||||||
<APACHE_PATH>/htdocs.
|
|
||||||
|
|
||||||
<APACHE_PATH> = path to your apache installation
|
|
||||||
|
|
||||||
Edit httpd.conf under c:/<APACHE_PATH>/conf
|
|
||||||
|
|
||||||
DocumentRoot "c:/<APACHE_PATH>/htdocs"
|
|
||||||
|
|
||||||
<Directory "c:/<APACHE_PATH>/htdocs">
|
|
||||||
AllowOverride All --
|
|
||||||
Require all granted -- this is required in Apache 2.4.4
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
Check that you have the following modules enabled
|
|
||||||
|
|
||||||
LoadModule cgi_module modules/mod_cgi.so
|
|
||||||
LoadModule rewrite_module modules/mod_rewrite.so
|
|
||||||
|
|
||||||
####Tip:
|
|
||||||
>To check the syntax of your httpd.conf file. From command line run the following
|
|
||||||
|
|
||||||
$>httpd - t
|
|
||||||
|
|
||||||
|
|
||||||
>.htaccess CGI
|
|
||||||
http://perishablepress.com/stupid-htaccess-tricks/
|
|
||||||
|
|
||||||
####.htaccess
|
|
||||||
|
|
||||||
Options +ExecCGI +Includes +FollowSymLinks -Indexes
|
|
||||||
AddHandler cgi-script exe
|
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine on
|
|
||||||
|
|
||||||
RewriteRule ^$ $service [L]
|
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteCond %{REQUEST_URI} !$service
|
|
||||||
RewriteRule ^(.*)$ $service/$1
|
|
||||||
|
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
|
||||||
</IfModule
|
|
||||||
|
|
||||||
>Replace $service with the name of your executable service, for example app_service.exe
|
|
||||||
|
|
||||||
|
|
||||||
####Deploying EWF FCGI
|
|
||||||
>To deploy FCGI you will need to download the mod_fcgi module.
|
|
||||||
>You can get it from here http://www.apachelounge.com/download/
|
|
||||||
|
|
||||||
####FCGI overview
|
|
||||||
>FastCGI allows a single, long-running process to handle more than one user request while keeping close to the CGI programming model, retaining the simplicity while eliminating the overhead of creating a new process for each request. Unlike converting an application to a web server plug-in, FastCGI applications remain independent of the web server.
|
|
||||||
|
|
||||||
* Build EWF application
|
|
||||||
|
|
||||||
ec -config [app.ecf] -target [app_fcgi] -finalize -c_compile -project_path .
|
|
||||||
|
|
||||||
>Note: change app.ecf and target app_fcgi based on your own configuration.
|
|
||||||
|
|
||||||
* Copy the generated exe file and the www content
|
|
||||||
|
|
||||||
Copy the app.exe and the folder "www" into a folder served by apache2, for example under
|
|
||||||
|
|
||||||
<APACHE_PATH>/htdocs.
|
|
||||||
|
|
||||||
<APACHE_PATH> = path to your apache installation
|
|
||||||
|
|
||||||
Edit httpd.conf under c:/<APACHE_PATH>/conf
|
|
||||||
|
|
||||||
DocumentRoot "c:/<APACHE_PATH>/htdocs"
|
|
||||||
|
|
||||||
<Directory "c:/<APACHE_PATH>/htdocs">
|
|
||||||
AllowOverride All --
|
|
||||||
Require all granted -- this is required in Apache 2.4.4
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
>Check that you have the following modules enabled
|
|
||||||
|
|
||||||
LoadModule rewrite_module modules/mod_rewrite.so
|
|
||||||
LoadModule fcgid_module modules/mod_fcgid.so
|
|
||||||
|
|
||||||
>NOTE: By default Apache does not come with fcgid module, so you will need to download it, and put the module under Apache2/modules
|
|
||||||
|
|
||||||
#.htaccess FCGI
|
|
||||||
>http://perishablepress.com/stupid-htaccess-tricks/
|
|
||||||
|
|
||||||
####.htaccess
|
|
||||||
|
|
||||||
Options +ExecCGI +Includes +FollowSymLinks -Indexes
|
|
||||||
|
|
||||||
<IfModule mod_fcgid.c>
|
|
||||||
AddHandler fcgid-script .ews
|
|
||||||
FcgidWrapper $FULL_PATH/$service .ews
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine on
|
|
||||||
|
|
||||||
RewriteBase /
|
|
||||||
RewriteRule ^$ service.ews [L]
|
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
|
||||||
RewriteCond %{REQUEST_URI} !service.ews
|
|
||||||
RewriteRule ^(.*)$ service.ews/$1
|
|
||||||
|
|
||||||
|
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
Replace $service with the name of your executable $service, for example app_service.exe
|
|
||||||
You will need to create an service.ews file, this file will be located at the same place where you copy your app service executable.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
* [EWF Introduction](#introduction)
|
* [EWF Introduction](#introduction)
|
||||||
* [Handling Requests: Form/Query Parameter](#form_query_parameters)
|
* [Handling Requests: Form/Query Parameter](#form_query_parameters)
|
||||||
* [Handling Requests: Header Fields](#header_fields)
|
* [Handling Requests: Header Fields](#header_fields)
|
||||||
* [Generating Responses](#generating responses)
|
* [Generating Responses](/workbook/generating_response/generating_response.md)
|
||||||
* [Handling Cookies](#handling_cookies)
|
* [Handling Cookies](/workbook/handling_cookies/handling_cookies.md)
|
||||||
* [EWF Deployment](#deployment)
|
*
|
||||||
|
|
||||||
<a name="core"></a>
|
<a name="core"></a>
|
||||||
# EWF Core
|
# EWF Core
|
||||||
@@ -29,14 +29,10 @@ Before reading (or walking throught) the workbook, to get a quick overview of EW
|
|||||||
## Handling Requests: Header Fields
|
## Handling Requests: Header Fields
|
||||||
[Handling Requests: Header Fields](/doc/workbook/handling_request/headers.md).
|
[Handling Requests: Header Fields](/doc/workbook/handling_request/headers.md).
|
||||||
|
|
||||||
<a name="generating_responses"></a>
|
<a name="header_fields"></a>
|
||||||
## Generating Response
|
## Generating Response
|
||||||
[Generating Responses](/doc/workbook/generating_response/generating_response.md)
|
[Generating Responses](/doc/workbook/generating_response/generating_response.md)
|
||||||
|
|
||||||
<a name="handling_cookies"></a>
|
|
||||||
## Handling Cookies
|
## Handling Cookies
|
||||||
[Handling Cookies](/doc/workbook/handling_cookies/handling_cookies.md)
|
[Handling Cookies](/doc/workbook/handling_cookies/handling_cookies.md)
|
||||||
|
|
||||||
<a name="deployment"/>
|
|
||||||
## EWF Deployment
|
|
||||||
[EWF Deployment](/doc/workbook/deployment.md)
|
|
||||||
|
|||||||
@@ -410,7 +410,11 @@ feature {NONE} -- Implementation
|
|||||||
local
|
local
|
||||||
utf: UTF_CONVERTER
|
utf: UTF_CONVERTER
|
||||||
do
|
do
|
||||||
a_output.append (utf.utf_32_string_to_utf_8_string_8 (s))
|
--if s.is_valid_as_string_8 then
|
||||||
|
--a_output.append (s.as_string_8)
|
||||||
|
--else
|
||||||
|
a_output.append (utf.utf_32_string_to_utf_8_string_8 (s))
|
||||||
|
--end
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Constants
|
feature -- Constants
|
||||||
|
|||||||
@@ -58,15 +58,13 @@ feature -- Status
|
|||||||
do
|
do
|
||||||
p := a_path
|
p := a_path
|
||||||
l_uri := based_uri (uri, a_router)
|
l_uri := based_uri (uri, a_router)
|
||||||
if trailing_slash_ignored then
|
if l_uri.ends_with ("/") then
|
||||||
if l_uri.ends_with ("/") then
|
if not p.ends_with ("/") then
|
||||||
if not p.ends_with ("/") then
|
p := p + "/"
|
||||||
p := p + "/"
|
end
|
||||||
end
|
else
|
||||||
else
|
if p.ends_with ("/") then
|
||||||
if p.ends_with ("/") then
|
p := p.substring (1, p.count - 1)
|
||||||
p := p.substring (1, p.count - 1)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if p.same_string (l_uri) then
|
if p.same_string (l_uri) then
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ note
|
|||||||
description: "[
|
description: "[
|
||||||
Table which can contain value indexed by a key
|
Table which can contain value indexed by a key
|
||||||
]"
|
]"
|
||||||
date: "$Date: 2015-11-05 21:52:56 +0100 (jeu., 05 nov. 2015) $"
|
date: "$Date$"
|
||||||
revision: "$Revision: 98081 $"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
WSF_TABLE
|
WSF_TABLE
|
||||||
@@ -14,7 +14,7 @@ inherit
|
|||||||
as_string
|
as_string
|
||||||
end
|
end
|
||||||
|
|
||||||
TABLE_ITERABLE [WSF_VALUE, READABLE_STRING_32]
|
ITERABLE [WSF_VALUE]
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
@@ -193,7 +193,7 @@ feature -- Element change
|
|||||||
|
|
||||||
feature -- Traversing
|
feature -- Traversing
|
||||||
|
|
||||||
new_cursor: TABLE_ITERATION_CURSOR [WSF_VALUE, READABLE_STRING_32]
|
new_cursor: ITERATION_CURSOR [WSF_VALUE]
|
||||||
do
|
do
|
||||||
Result := values.new_cursor
|
Result := values.new_cursor
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ inherit
|
|||||||
feature -- Smart parameter identification
|
feature -- Smart parameter identification
|
||||||
|
|
||||||
add_utf_8_string_value_to_table (a_utf_8_name: READABLE_STRING_8; a_utf_8_value: READABLE_STRING_8; a_table: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
add_utf_8_string_value_to_table (a_utf_8_name: READABLE_STRING_8; a_utf_8_value: READABLE_STRING_8; a_table: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
||||||
-- Add a utf-8 string value `a_utf_8_value' associated with name `a_utf_8_name' to `a_table'.
|
|
||||||
local
|
local
|
||||||
utf: UTF_CONVERTER
|
utf: UTF_CONVERTER
|
||||||
n,v: READABLE_STRING_32
|
n,v: READABLE_STRING_32
|
||||||
@@ -32,7 +31,6 @@ feature -- Smart parameter identification
|
|||||||
end
|
end
|
||||||
|
|
||||||
add_percent_encoded_string_value_to_table (a_encoded_name: READABLE_STRING_8; a_encoded_value: READABLE_STRING_8; a_table: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
add_percent_encoded_string_value_to_table (a_encoded_name: READABLE_STRING_8; a_encoded_value: READABLE_STRING_8; a_table: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
||||||
-- Add a percent-encoded string value `a_encoded_value' associated with name `a_encoded_name' to `a_table'.
|
|
||||||
local
|
local
|
||||||
v: WSF_STRING
|
v: WSF_STRING
|
||||||
do
|
do
|
||||||
@@ -41,7 +39,6 @@ feature -- Smart parameter identification
|
|||||||
end
|
end
|
||||||
|
|
||||||
add_value_to_table (a_name: READABLE_STRING_GENERAL; a_value: WSF_VALUE; a_table: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
add_value_to_table (a_name: READABLE_STRING_GENERAL; a_value: WSF_VALUE; a_table: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
||||||
-- Add value `a_value' associated with unicode name `a_name' to `a_table'.
|
|
||||||
local
|
local
|
||||||
l_decoded_name: STRING_32
|
l_decoded_name: STRING_32
|
||||||
l_encoded_name: READABLE_STRING_8
|
l_encoded_name: READABLE_STRING_8
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ feature -- Conversion
|
|||||||
a_html.append ("<td")
|
a_html.append ("<td")
|
||||||
append_css_class_to (a_html, Void)
|
append_css_class_to (a_html, Void)
|
||||||
append_css_style_to (a_html)
|
append_css_style_to (a_html)
|
||||||
append_html_attributes_to (a_html)
|
|
||||||
a_html.append_character ('>')
|
a_html.append_character ('>')
|
||||||
content.append_to_html (a_theme, a_html)
|
content.append_to_html (a_theme, a_html)
|
||||||
a_html.append ("</td>")
|
a_html.append ("</td>")
|
||||||
|
|||||||
12
library/text/parser/feed/tests/tests.ecf
Normal file
12
library/text/parser/feed/tests/tests.ecf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-14-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-14-0 http://www.eiffel.com/developers/xml/configuration-1-14-0.xsd" name="tests" uuid="C68BD5DC-F756-484E-A9FE-F2D1FD432B2A">
|
||||||
|
<target name="tests">
|
||||||
|
<root class="ANY" feature="default_create"/>
|
||||||
|
<setting name="console_application" value="false"/>
|
||||||
|
<setting name="concurrency" value="none"/>
|
||||||
|
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||||
|
<library name="feed" location="..\feed.ecf"/>
|
||||||
|
<library name="testing" location="$ISE_LIBRARY\library\testing\testing.ecf"/>
|
||||||
|
<tests name="src" location=".\" recursive="true"/>
|
||||||
|
</target>
|
||||||
|
</system>
|
||||||
Reference in New Issue
Block a user