Merge branch 'v1'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="notification_email" uuid="99D9A065-CD45-4E20-9C86-579C8AD42E5E" library_target="notification_email">
|
||||
<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="notification_email" uuid="99D9A065-CD45-4E20-9C86-579C8AD42E5E" library_target="notification_email">
|
||||
<target name="notification_email">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
@@ -11,8 +11,20 @@
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="http" location="..\..\..\network\protocol\http\http-safe.ecf"/>
|
||||
<library name="net" location="$ISE_LIBRARY\library\net\net-safe.ecf">
|
||||
<condition>
|
||||
<custom name="smtp_notification_email_disabled" excluded_value="true"/>
|
||||
</condition>
|
||||
</library>
|
||||
<library name="process" location="$ISE_LIBRARY\library\process\process-safe.ecf"/>
|
||||
<library name="time" location="$ISE_LIBRARY\library\time\time-safe.ecf"/>
|
||||
<cluster name="src" location=".\" recursive="true"/>
|
||||
<cluster name="src" location=".\" >
|
||||
<cluster name="storage" location="$|storage"/>
|
||||
<cluster name="smtp" location="$|smtp">
|
||||
<condition>
|
||||
<custom name="smtp_notification_email_disabled" excluded_value="true"/>
|
||||
</condition>
|
||||
</cluster>
|
||||
</cluster>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
@@ -2,9 +2,9 @@ note
|
||||
description : "[
|
||||
Component representing an email
|
||||
]"
|
||||
author : "$Author$"
|
||||
date : "$Date$"
|
||||
revision : "$Revision$"
|
||||
author : "$Author: jfiat $"
|
||||
date : "$Date: 2015-06-30 11:07:17 +0200 (mar., 30 juin 2015) $"
|
||||
revision : "$Revision: 97586 $"
|
||||
|
||||
class
|
||||
NOTIFICATION_EMAIL
|
||||
@@ -14,15 +14,17 @@ create
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_from: like from_address; a_to_address: READABLE_STRING_8; a_subject: like subject; a_body: like body)
|
||||
make (a_from: like from_address; a_to_address: READABLE_STRING_8; a_subject: like subject; a_content: like content)
|
||||
-- Initialize `Current'.
|
||||
require
|
||||
well_formed_from_address: is_valid_address (a_from)
|
||||
well_formed_to_address: a_to_address.has ('@')
|
||||
do
|
||||
initialize
|
||||
from_address := a_from
|
||||
subject := a_subject
|
||||
body := a_body
|
||||
content := a_content
|
||||
to_addresses.extend (a_to_address)
|
||||
|
||||
end
|
||||
|
||||
initialize
|
||||
@@ -37,11 +39,36 @@ feature -- Access
|
||||
|
||||
from_address: READABLE_STRING_8
|
||||
|
||||
reply_to_address: detachable READABLE_STRING_8
|
||||
|
||||
to_addresses: ARRAYED_LIST [READABLE_STRING_8]
|
||||
|
||||
cc_addresses: detachable ARRAYED_LIST [READABLE_STRING_8]
|
||||
|
||||
bcc_addresses: detachable ARRAYED_LIST [READABLE_STRING_8]
|
||||
|
||||
subject: READABLE_STRING_8
|
||||
|
||||
body: READABLE_STRING_8
|
||||
content: READABLE_STRING_8
|
||||
|
||||
additional_header_lines: detachable ARRAYED_LIST [READABLE_STRING_8]
|
||||
-- Additional header lines.
|
||||
|
||||
body: like content
|
||||
obsolete
|
||||
"Use `content' [June/2015]"
|
||||
do
|
||||
Result := body
|
||||
end
|
||||
|
||||
feature -- Status report
|
||||
|
||||
is_valid: BOOLEAN
|
||||
-- Is current email ready to be sent?
|
||||
do
|
||||
Result := is_valid_address (from_address) and
|
||||
across to_addresses as ic all is_valid_address (ic.item) end
|
||||
end
|
||||
|
||||
feature -- Change
|
||||
|
||||
@@ -50,13 +77,90 @@ feature -- Change
|
||||
date := d
|
||||
end
|
||||
|
||||
set_subject (s: READABLE_STRING_8)
|
||||
-- Set `subject' to `s'.
|
||||
do
|
||||
subject := s
|
||||
end
|
||||
|
||||
set_content (s: READABLE_STRING_8)
|
||||
-- Set `content' to `s'.
|
||||
do
|
||||
content := s
|
||||
end
|
||||
|
||||
set_from_address (add: READABLE_STRING_8)
|
||||
require
|
||||
well_formed_address: add.has ('@')
|
||||
do
|
||||
from_address := add
|
||||
end
|
||||
|
||||
add_cc_address (add: READABLE_STRING_8)
|
||||
require
|
||||
well_formed_address: add.has ('@')
|
||||
local
|
||||
lst: like cc_addresses
|
||||
do
|
||||
lst := cc_addresses
|
||||
if lst = Void then
|
||||
create lst.make (1)
|
||||
cc_addresses := lst
|
||||
end
|
||||
lst.force (add)
|
||||
end
|
||||
|
||||
add_bcc_address (add: READABLE_STRING_8)
|
||||
require
|
||||
well_formed_address: add.has ('@')
|
||||
local
|
||||
lst: like bcc_addresses
|
||||
do
|
||||
lst := bcc_addresses
|
||||
if lst = Void then
|
||||
create lst.make (1)
|
||||
bcc_addresses := lst
|
||||
end
|
||||
lst.force (add)
|
||||
end
|
||||
|
||||
add_header_line (a_line: READABLE_STRING_8)
|
||||
require
|
||||
well_formed_header_line: a_line.has (':')
|
||||
local
|
||||
lst: like additional_header_lines
|
||||
do
|
||||
lst := additional_header_lines
|
||||
if lst = Void then
|
||||
create lst.make (1)
|
||||
additional_header_lines := lst
|
||||
end
|
||||
lst.force (a_line)
|
||||
end
|
||||
|
||||
feature -- Reset
|
||||
|
||||
reset
|
||||
do
|
||||
reset_addresses
|
||||
additional_header_lines := Void
|
||||
end
|
||||
|
||||
reset_addresses
|
||||
-- Reset all addresses.
|
||||
do
|
||||
to_addresses.wipe_out
|
||||
cc_addresses := Void
|
||||
bcc_addresses := Void
|
||||
end
|
||||
|
||||
feature -- Conversion
|
||||
|
||||
message: STRING_8
|
||||
do
|
||||
Result := header
|
||||
Result.append_character ('%N')
|
||||
Result.append (body)
|
||||
Result.append (content)
|
||||
Result.append_character ('%N')
|
||||
Result.append_character ('%N')
|
||||
end
|
||||
@@ -66,13 +170,14 @@ feature -- Conversion
|
||||
hdate: HTTP_DATE
|
||||
do
|
||||
create Result.make (20)
|
||||
if attached reply_to_address as l_reply_to then
|
||||
Result.append ("Reply-To: ")
|
||||
Result.append (l_reply_to)
|
||||
Result.append_character ('%N')
|
||||
end
|
||||
Result.append ("From: ")
|
||||
Result.append (from_address)
|
||||
Result.append_character ('%N')
|
||||
Result.append ("Date: ")
|
||||
create hdate.make_from_date_time (date)
|
||||
hdate.append_to_rfc1123_string (Result)
|
||||
Result.append (" GMT%N")
|
||||
Result.append ("To: ")
|
||||
across
|
||||
to_addresses as c
|
||||
@@ -81,18 +186,67 @@ feature -- Conversion
|
||||
Result.append_character (';')
|
||||
end
|
||||
Result.append_character ('%N')
|
||||
if
|
||||
attached cc_addresses as l_cc and then
|
||||
not l_cc.is_empty
|
||||
then
|
||||
Result.append ("Cc: ")
|
||||
across
|
||||
l_cc as c
|
||||
loop
|
||||
Result.append (c.item)
|
||||
Result.append_character (';')
|
||||
end
|
||||
Result.append_character ('%N')
|
||||
end
|
||||
if
|
||||
attached bcc_addresses as l_bcc and then
|
||||
not l_bcc.is_empty
|
||||
then
|
||||
Result.append ("Bcc: ")
|
||||
across
|
||||
l_bcc as c
|
||||
loop
|
||||
Result.append (c.item)
|
||||
Result.append_character (';')
|
||||
end
|
||||
Result.append_character ('%N')
|
||||
end
|
||||
Result.append ("Subject: ")
|
||||
Result.append (subject)
|
||||
Result.append_character ('%N')
|
||||
Result.append ("Date: ")
|
||||
create hdate.make_from_date_time (date)
|
||||
hdate.append_to_rfc1123_string (Result)
|
||||
Result.append_character ('%N')
|
||||
if attached additional_header_lines as l_lines and then
|
||||
not l_lines.is_empty
|
||||
then
|
||||
across
|
||||
l_lines as ic
|
||||
loop
|
||||
Result.append (ic.item)
|
||||
Result.append_character ('%N')
|
||||
end
|
||||
end
|
||||
ensure
|
||||
Result.ends_with ("%N")
|
||||
end
|
||||
|
||||
feature -- Helpers
|
||||
|
||||
is_valid_address (add: READABLE_STRING_8): BOOLEAN
|
||||
-- Is `add' a valid email address?
|
||||
do
|
||||
-- FIXME: improve email validation
|
||||
Result := add.has ('@')
|
||||
end
|
||||
|
||||
invariant
|
||||
-- invariant_clause: True
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -11,8 +11,20 @@
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="http" location="..\..\..\network\protocol\http\http.ecf"/>
|
||||
<library name="net" location="$ISE_LIBRARY\library\net\net.ecf">
|
||||
<condition>
|
||||
<custom name="smtp_notification_email_disabled" excluded_value="true"/>
|
||||
</condition>
|
||||
</library>
|
||||
<library name="process" location="$ISE_LIBRARY\library\process\process.ecf"/>
|
||||
<library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
|
||||
<cluster name="src" location="." recursive="true"/>
|
||||
<cluster name="src" location=".">
|
||||
<cluster name="storage" location="$|storage"/>
|
||||
<cluster name="smtp" location="$|smtp">
|
||||
<condition>
|
||||
<custom name="smtp_notification_email_disabled" excluded_value="true"/>
|
||||
</condition>
|
||||
</cluster>
|
||||
</cluster>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
@@ -2,9 +2,9 @@ note
|
||||
description: "[
|
||||
Component responsible to send email
|
||||
]"
|
||||
author: "$Author$"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
author: "$Author: jfiat $"
|
||||
date: "$Date: 2015-06-30 11:07:17 +0200 (mar., 30 juin 2015) $"
|
||||
revision: "$Revision: 97586 $"
|
||||
|
||||
deferred class
|
||||
NOTIFICATION_MAILER
|
||||
@@ -45,8 +45,40 @@ feature -- Basic operation
|
||||
deferred
|
||||
end
|
||||
|
||||
feature -- Error
|
||||
|
||||
has_error: BOOLEAN
|
||||
-- Previous operation reported error?
|
||||
-- Use `reset_errors', to reset this state.
|
||||
do
|
||||
Result := attached last_errors as lst and then not lst.is_empty
|
||||
end
|
||||
|
||||
reset_errors
|
||||
-- Reset last errors.
|
||||
do
|
||||
last_errors := Void
|
||||
end
|
||||
|
||||
last_errors: detachable ARRAYED_LIST [READABLE_STRING_32]
|
||||
-- Last reported errors since previous `reset_errors' call.
|
||||
|
||||
report_error (a_msg: READABLE_STRING_GENERAL)
|
||||
-- Report error message `a_msg'.
|
||||
local
|
||||
lst: like last_errors
|
||||
do
|
||||
lst := last_errors
|
||||
if lst = Void then
|
||||
create lst.make (1)
|
||||
last_errors := lst
|
||||
end
|
||||
lst.force (a_msg.to_string_32)
|
||||
end
|
||||
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
note
|
||||
description: "Mailer that does nothing."
|
||||
date: "$Date: 2015-06-30 15:49:56 +0200 (mar., 30 juin 2015) $"
|
||||
revision: "$Revision: 97588 $"
|
||||
|
||||
class
|
||||
NOTIFICATION_NULL_MAILER
|
||||
|
||||
inherit
|
||||
NOTIFICATION_MAILER
|
||||
|
||||
feature -- Status
|
||||
|
||||
is_available: BOOLEAN = True
|
||||
-- <Precursor>
|
||||
|
||||
feature -- Basic operation
|
||||
|
||||
process_email (a_email: NOTIFICATION_EMAIL)
|
||||
-- <Precursor>
|
||||
do
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, 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
|
||||
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
|
||||
@@ -2,9 +2,9 @@ note
|
||||
description : "[
|
||||
NOTIFICATION_MAILER using sendmail as mailtool
|
||||
]"
|
||||
author: "$Author$"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
author: "$Author: jfiat $"
|
||||
date: "$Date: 2015-06-30 15:49:56 +0200 (mar., 30 juin 2015) $"
|
||||
revision: "$Revision: 97588 $"
|
||||
|
||||
class
|
||||
NOTIFICATION_SENDMAIL_MAILER
|
||||
@@ -16,23 +16,29 @@ inherit
|
||||
end
|
||||
|
||||
create
|
||||
default_create
|
||||
default_create,
|
||||
make_with_location
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make_with_location (a_path: READABLE_STRING_GENERAL)
|
||||
do
|
||||
make (a_path, <<"-t">>)
|
||||
set_stdin_mode (True, "%N.%N%N")
|
||||
end
|
||||
|
||||
default_create
|
||||
do
|
||||
Precursor
|
||||
make ("/usr/sbin/sendmail", <<"-t">>)
|
||||
make_with_location ("/usr/sbin/sendmail")
|
||||
if not is_available then
|
||||
make ("/usr/bin/sendmail", <<"-t">>)
|
||||
make_with_location ("/usr/bin/sendmail")
|
||||
end
|
||||
set_stdin_mode (True, "%N.%N%N")
|
||||
end
|
||||
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
note
|
||||
description: "Summary description for {NOTIFICATION_STORAGE_MAILER}."
|
||||
author: ""
|
||||
date: "$Date: 2015-06-30 15:49:56 +0200 (mar., 30 juin 2015) $"
|
||||
revision: "$Revision: 97588 $"
|
||||
|
||||
class
|
||||
NOTIFICATION_STORAGE_MAILER
|
||||
|
||||
inherit
|
||||
NOTIFICATION_MAILER
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_storage: NOTIFICATION_EMAIL_STORAGE)
|
||||
do
|
||||
storage := a_storage
|
||||
end
|
||||
|
||||
storage: NOTIFICATION_EMAIL_STORAGE
|
||||
|
||||
feature -- Status report
|
||||
|
||||
is_available: BOOLEAN
|
||||
-- <Precursor>
|
||||
do
|
||||
Result := storage.is_available
|
||||
end
|
||||
|
||||
feature -- Basic operation
|
||||
|
||||
process_email (a_email: NOTIFICATION_EMAIL)
|
||||
-- <Precursor>
|
||||
do
|
||||
storage.put (a_email)
|
||||
if storage.has_error then
|
||||
report_error ("Issue storing email.")
|
||||
end
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, 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
|
||||
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
|
||||
@@ -0,0 +1,181 @@
|
||||
note
|
||||
description: "[
|
||||
Notification mailer based on STMP protocol.
|
||||
|
||||
Note: it is based on EiffelNet {SMTP_PROTOCOL} implementation, and may not be complete.
|
||||
]"
|
||||
author: "$Author: jfiat $"
|
||||
date: "$Date: 2015-06-30 11:07:17 +0200 (mar., 30 juin 2015) $"
|
||||
revision: "$Revision: 97586 $"
|
||||
|
||||
class
|
||||
NOTIFICATION_SMTP_MAILER
|
||||
|
||||
inherit
|
||||
NOTIFICATION_MAILER
|
||||
|
||||
create
|
||||
make,
|
||||
make_with_user
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_smtp_server: READABLE_STRING_8)
|
||||
do
|
||||
make_with_user (a_smtp_server, Void, Void)
|
||||
end
|
||||
|
||||
make_with_user (a_smtp_server: READABLE_STRING_8; a_user: detachable READABLE_STRING_8; a_password: detachable READABLE_STRING_8)
|
||||
-- Initialize `Current'.
|
||||
local
|
||||
i: INTEGER
|
||||
do
|
||||
i := a_smtp_server.index_of (':', 1)
|
||||
if i > 0 then
|
||||
smtp_host := a_smtp_server.substring (1, i - 1)
|
||||
smtp_port := a_smtp_server.substring (i + 1, a_smtp_server.count).to_integer
|
||||
else
|
||||
smtp_host := a_smtp_server
|
||||
smtp_port := 0
|
||||
end
|
||||
username := a_user
|
||||
initialize
|
||||
end
|
||||
|
||||
initialize
|
||||
-- Initialize service.
|
||||
local
|
||||
l_address_factory: INET_ADDRESS_FACTORY
|
||||
do
|
||||
if attached username as u then
|
||||
create smtp_protocol.make (smtp_host, u)
|
||||
else
|
||||
-- Get local host name needed in creation of SMTP_PROTOCOL.
|
||||
create l_address_factory
|
||||
create smtp_protocol.make (smtp_host, l_address_factory.create_localhost.host_name)
|
||||
end
|
||||
if smtp_port > 0 then
|
||||
smtp_protocol.set_default_port (smtp_port)
|
||||
end
|
||||
reset_errors
|
||||
end
|
||||
|
||||
smtp_protocol: SMTP_PROTOCOL
|
||||
-- SMTP protocol.
|
||||
|
||||
feature -- Access
|
||||
|
||||
smtp_host: READABLE_STRING_8
|
||||
|
||||
smtp_port: INTEGER
|
||||
|
||||
username: detachable READABLE_STRING_8
|
||||
|
||||
feature -- Status
|
||||
|
||||
is_available: BOOLEAN
|
||||
do
|
||||
Result := True
|
||||
end
|
||||
|
||||
feature -- Basic operation
|
||||
|
||||
process_email (a_email: NOTIFICATION_EMAIL)
|
||||
-- Process the sending of `a_email'
|
||||
local
|
||||
l_email: EMAIL
|
||||
h: STRING
|
||||
k,v: STRING
|
||||
i: INTEGER
|
||||
hdate: HTTP_DATE
|
||||
do
|
||||
create l_email.make_with_entry (a_email.from_address, addresses_to_header_line_value (a_email.to_addresses))
|
||||
if attached a_email.reply_to_address as l_reply_to then
|
||||
l_email.add_header_entry ({EMAIL_CONSTANTS}.h_reply_to, l_reply_to)
|
||||
end
|
||||
|
||||
if attached a_email.cc_addresses as lst then
|
||||
l_email.add_header_entry ({EMAIL_CONSTANTS}.h_cc, addresses_to_header_line_value (lst))
|
||||
end
|
||||
if attached a_email.bcc_addresses as lst then
|
||||
l_email.add_header_entry ({EMAIL_CONSTANTS}.h_bcc, addresses_to_header_line_value (lst))
|
||||
end
|
||||
l_email.set_message (a_email.content)
|
||||
l_email.add_header_entry ({EMAIL_CONSTANTS}.H_subject, a_email.subject)
|
||||
|
||||
create h.make_empty
|
||||
create hdate.make_from_date_time (a_email.date)
|
||||
hdate.append_to_rfc1123_string (h)
|
||||
l_email.add_header_entry ("Date", h)
|
||||
|
||||
if attached a_email.additional_header_lines as lst then
|
||||
across
|
||||
lst as ic
|
||||
loop
|
||||
h := ic.item
|
||||
i := h.index_of (':', 1)
|
||||
if i > 0 then
|
||||
k := h.head (i - 1)
|
||||
v := h.substring (i + 1, h.count)
|
||||
l_email.add_header_entry (k, v)
|
||||
else
|
||||
check is_header_line: False end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
smtp_send_email (l_email)
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
addresses_to_header_line_value (lst: ITERABLE [READABLE_STRING_8]): STRING
|
||||
local
|
||||
l_need_separator: BOOLEAN
|
||||
do
|
||||
create Result.make (10)
|
||||
l_need_separator := False
|
||||
across
|
||||
lst as ic
|
||||
loop
|
||||
if l_need_separator then
|
||||
Result.append_character (',')
|
||||
Result.append_character (' ')
|
||||
else
|
||||
l_need_separator := True
|
||||
end
|
||||
Result.append (ic.item)
|
||||
end
|
||||
end
|
||||
|
||||
smtp_send_email (a_email: EMAIL)
|
||||
-- Send the email represented by `a_email'.
|
||||
local
|
||||
retried: BOOLEAN
|
||||
do
|
||||
if not retried then
|
||||
smtp_protocol.initiate_protocol
|
||||
smtp_protocol.transfer (a_email)
|
||||
smtp_protocol.close_protocol
|
||||
if smtp_protocol.error then
|
||||
report_error ("smtp_protocol reported an error.")
|
||||
end
|
||||
end
|
||||
rescue
|
||||
report_error ("smtp_protocol raised an exception.")
|
||||
retried := True
|
||||
retry
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, 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
|
||||
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
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
note
|
||||
description: "Store email in specific file (could also be stderr, ...)."
|
||||
date: "$Date: 2015-06-30 15:49:56 +0200 (mar., 30 juin 2015) $"
|
||||
revision: "$Revision: 97588 $"
|
||||
|
||||
class
|
||||
NOTIFICATION_EMAIL_FILE_STORAGE
|
||||
|
||||
inherit
|
||||
NOTIFICATION_EMAIL_STORAGE
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_output_file: FILE)
|
||||
require
|
||||
a_output_file_valid: a_output_file.exists
|
||||
do
|
||||
output := a_output_file
|
||||
end
|
||||
|
||||
output: FILE
|
||||
|
||||
feature -- Status report
|
||||
|
||||
is_available: BOOLEAN
|
||||
-- Is associated storage available?
|
||||
do
|
||||
Result := output.exists and output.is_access_writable
|
||||
end
|
||||
|
||||
has_error: BOOLEAN
|
||||
-- Last operation reported an error?
|
||||
|
||||
feature -- Storage
|
||||
|
||||
put (a_email: NOTIFICATION_EMAIL)
|
||||
-- Store `a_email'.
|
||||
local
|
||||
retried: BOOLEAN
|
||||
l_close_needed: BOOLEAN
|
||||
do
|
||||
if not retried then
|
||||
has_error := False
|
||||
if not output.is_open_write then
|
||||
output.open_write
|
||||
l_close_needed := True
|
||||
end
|
||||
output.put_string ("%N----%N" + a_email.message)
|
||||
if l_close_needed then
|
||||
output.close
|
||||
else
|
||||
output.flush
|
||||
end
|
||||
end
|
||||
rescue
|
||||
retried := True
|
||||
has_error := True
|
||||
retry
|
||||
end
|
||||
|
||||
;note
|
||||
copyright: "2011-2015, 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
|
||||
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
|
||||
@@ -0,0 +1,38 @@
|
||||
note
|
||||
description: "Abtract interface of email storage."
|
||||
date: "$Date: 2015-06-30 15:49:56 +0200 (mar., 30 juin 2015) $"
|
||||
revision: "$Revision: 97588 $"
|
||||
|
||||
deferred class
|
||||
NOTIFICATION_EMAIL_STORAGE
|
||||
|
||||
feature -- Status report
|
||||
|
||||
is_available: BOOLEAN
|
||||
-- Is associated storage available?
|
||||
deferred
|
||||
end
|
||||
|
||||
has_error: BOOLEAN
|
||||
-- Last operation reported an error?
|
||||
deferred
|
||||
end
|
||||
|
||||
feature -- Storage
|
||||
|
||||
put (a_email: NOTIFICATION_EMAIL)
|
||||
-- Store `a_email'.
|
||||
deferred
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, 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
|
||||
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
|
||||
@@ -29,8 +29,8 @@ feature {NONE} -- Initialization
|
||||
|
||||
setup_router
|
||||
do
|
||||
map_uri_template_agent ("/", agent handle_root)
|
||||
map_uri_template_agent ("/openid", agent handle_openid)
|
||||
map_uri_template_agent ("/", agent handle_root, Void)
|
||||
map_uri_template_agent ("/openid", agent handle_openid, Void)
|
||||
end
|
||||
|
||||
handle_root (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
|
||||
@@ -200,43 +200,31 @@ feature -- SSL Helpers
|
||||
set_ssl_protocol_to_ssl_2_or_3
|
||||
-- Set `ssl_protocol' with `Ssl_23'.
|
||||
deferred
|
||||
ensure
|
||||
ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Ssl_23
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_ssl_3
|
||||
-- Set `ssl_protocol' with `Ssl_3'.
|
||||
deferred
|
||||
ensure
|
||||
ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Ssl_3
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_tls_1_0
|
||||
-- Set `ssl_protocol' with `Tls_1_0'.
|
||||
deferred
|
||||
ensure
|
||||
ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Tls_1_0
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_tls_1_1
|
||||
-- Set `ssl_protocol' with `Tls_1_1'.
|
||||
deferred
|
||||
ensure
|
||||
ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Tls_1_1
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_tls_1_2
|
||||
-- Set `ssl_protocol' with `Tls_1_2'.
|
||||
deferred
|
||||
ensure
|
||||
ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Tls_1_2
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_dtls_1_0
|
||||
-- Set `ssl_protocol' with `Dtls_1_0'.
|
||||
deferred
|
||||
ensure
|
||||
ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.Dtls_1_0
|
||||
end
|
||||
|
||||
note
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<library name="net" location="$ISE_LIBRARY\library\net\net-safe.ecf"/>
|
||||
<library name="net_ssl" location="$ISE_LIBRARY\unstable\library\network\socket\netssl\net_ssl-safe.ecf">
|
||||
<condition>
|
||||
<custom name="httpd_ssl_disabled" excluded_value="true"/>
|
||||
<custom name="httpd_ssl_enabled" value="true"/>
|
||||
</condition>
|
||||
</library>
|
||||
|
||||
@@ -27,19 +27,18 @@
|
||||
<library name="time" location="$ISE_LIBRARY\library\time\time-safe.ecf"/>
|
||||
<cluster name="httpd_server" location=".\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/concurrency$</exclude>
|
||||
<exclude>/ssl$</exclude>
|
||||
<exclude>/no_ssl$</exclude>
|
||||
</file_rule>
|
||||
<cluster name="no_ssl" location="$|no_ssl" recursive="true">
|
||||
<condition>
|
||||
<custom name="httpd_ssl_disabled" value="true"/>
|
||||
<custom name="httpd_ssl_enabled" excluded_value="true"/>
|
||||
</condition>
|
||||
</cluster>
|
||||
<cluster name="ssl" location="$|ssl" recursive="true">
|
||||
<condition>
|
||||
<custom name="httpd_ssl_disabled" excluded_value="true"/>
|
||||
<custom name="httpd_ssl_enabled" value="true"/>
|
||||
</condition>
|
||||
</cluster>
|
||||
<cluster name="concurrency_none" location="$|concurrency\none\" recursive="true">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<library name="net" location="$ISE_LIBRARY\library\net\net.ecf"/>
|
||||
<library name="net_ssl" location="$ISE_LIBRARY\unstable\library\network\socket\netssl\net_ssl.ecf">
|
||||
<condition>
|
||||
<custom name="httpd_ssl_disabled" excluded_value="true"/>
|
||||
<custom name="httpd_ssl_enabled" value="true"/>
|
||||
</condition>
|
||||
</library>
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
</file_rule>
|
||||
<cluster name="no_ssl" location="$|no_ssl" recursive="true">
|
||||
<condition>
|
||||
<custom name="httpd_ssl_disabled" value="true"/>
|
||||
<custom name="httpd_ssl_enabled" excluded_value="true"/>
|
||||
</condition>
|
||||
</cluster>
|
||||
<cluster name="ssl" location="$|ssl" recursive="true">
|
||||
<condition>
|
||||
<custom name="httpd_ssl_disabled" excluded_value="true"/>
|
||||
<custom name="httpd_ssl_enabled" value="true"/>
|
||||
</condition>
|
||||
</cluster>
|
||||
<cluster name="concurrency_none" location="$|concurrency\none\" recursive="true">
|
||||
|
||||
@@ -60,7 +60,6 @@ feature -- Access
|
||||
|
||||
is_persistent_connection_supported: BOOLEAN = True
|
||||
-- Is persistent connection supported?
|
||||
--| For now, disabled during dev.
|
||||
|
||||
feature -- Callbacks
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ feature -- Request processing
|
||||
else
|
||||
l_output.set_http_version (version)
|
||||
end
|
||||
res.set_is_persistent_connection_supported ({HTTPD_SERVER}.is_persistent_connection_supported)
|
||||
res.set_is_persistent_connection_requested (is_persistent_connection_requested)
|
||||
|
||||
req.set_meta_string_variable ("RAW_HEADER_DATA", request_header)
|
||||
@@ -111,22 +112,30 @@ feature -- Request processing
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
process_rescue (res: detachable WGI_RESPONSE)
|
||||
local
|
||||
s: STRING
|
||||
do
|
||||
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.trace as l_trace then
|
||||
if res /= Void then
|
||||
if not res.status_is_set then
|
||||
res.set_status_code ({HTTP_STATUS_CODE}.internal_server_error, Void)
|
||||
end
|
||||
create s.make_empty
|
||||
s.append ("<pre>")
|
||||
s.append (html_encoder.encoded_string (l_trace))
|
||||
s.append ("</pre>")
|
||||
if not res.header_committed then
|
||||
res.put_header_text ("Content-Type: text/html%R%NContent-Length: " + s.count.out + "%R%N%R%N")
|
||||
end
|
||||
if res.message_writable then
|
||||
res.put_string ("<pre>")
|
||||
res.put_string (html_encoder.encoded_string (l_trace))
|
||||
res.put_string ("</pre>")
|
||||
res.put_string (s)
|
||||
end
|
||||
res.push
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
httpd_environment (a_socket: HTTPD_STREAM_SOCKET): STRING_TABLE [READABLE_STRING_8]
|
||||
local
|
||||
|
||||
@@ -29,7 +29,7 @@ feature {NONE} -- Initialization
|
||||
last_target_call_succeed := True
|
||||
end
|
||||
|
||||
feature {WGI_STANDALONE_CONNECTOR, WGI_SERVICE} -- Nino
|
||||
feature {WGI_STANDALONE_CONNECTOR, WGI_SERVICE} -- Server
|
||||
|
||||
set_target (o: like target)
|
||||
do
|
||||
@@ -100,7 +100,7 @@ feature -- Status report
|
||||
-- <Precursor>
|
||||
-- for instance IO failure due to socket disconnection.
|
||||
do
|
||||
Result := not last_target_call_succeed
|
||||
Result := last_target_call_succeed
|
||||
end
|
||||
|
||||
is_open_write: BOOLEAN
|
||||
|
||||
@@ -23,6 +23,9 @@ feature -- Settings
|
||||
is_http_version_1_0: BOOLEAN
|
||||
-- Is associated request using HTTP/1.0 ?
|
||||
|
||||
is_persistent_connection_supported: BOOLEAN
|
||||
-- Is persistent connection supported?
|
||||
|
||||
is_persistent_connection_requested: BOOLEAN
|
||||
-- Is persistent connection requested?
|
||||
|
||||
@@ -34,6 +37,12 @@ feature -- Settings change
|
||||
is_http_version_1_0 := True
|
||||
end
|
||||
|
||||
set_is_persistent_connection_supported (b: BOOLEAN)
|
||||
-- Set `is_persistent_connection_supported' to `b'.
|
||||
do
|
||||
is_persistent_connection_supported := b
|
||||
end
|
||||
|
||||
set_is_persistent_connection_requested (b: BOOLEAN)
|
||||
-- Set `is_persistent_connection_requested' to `b'.
|
||||
do
|
||||
@@ -53,7 +62,7 @@ feature -- Header output operation
|
||||
create s.make_from_string (a_text)
|
||||
|
||||
i := s.substring_index ("%NConnection:", 1)
|
||||
if {HTTPD_SERVER}.is_persistent_connection_supported then
|
||||
if is_persistent_connection_supported then
|
||||
-- Current standalone support persistent connection.
|
||||
-- If HTTP/1.1:
|
||||
-- by default all connection are persistent
|
||||
|
||||
23
library/server/ewsgi/package.iron
Normal file
23
library/server/ewsgi/package.iron
Normal file
@@ -0,0 +1,23 @@
|
||||
package ewsgi
|
||||
|
||||
project
|
||||
ewsgi = "ewsgi-safe.ecf"
|
||||
ewsgi = "ewsgi.ecf"
|
||||
ewsgi_spec = "ewsgi_spec-safe.ecf"
|
||||
ewsgi_spec = "ewsgi_spec.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_nino = "connectors/nino/nino-safe.ecf"
|
||||
connector_nino = "connectors/nino/nino.ecf"
|
||||
connector_null = "connectors/null/null-safe.ecf"
|
||||
connector_null = "connectors/null/null.ecf"
|
||||
|
||||
note
|
||||
title: EWSGI
|
||||
description: EWSGI specification, and a few connectors.
|
||||
tags: web, httpd, ewf
|
||||
license: Eiffel Forum v2
|
||||
|
||||
end
|
||||
@@ -18,6 +18,13 @@ feature {NONE} -- Initialization
|
||||
response := res
|
||||
end
|
||||
|
||||
frozen make_from_execution (a_execution: WGI_EXECUTION)
|
||||
-- Create current execution from `a_execution'.
|
||||
do
|
||||
request := a_execution.request
|
||||
response := a_execution.response
|
||||
end
|
||||
|
||||
feature {WGI_EXECUTION} -- Access
|
||||
|
||||
request: WGI_REQUEST
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="connector_libfcgi" uuid="59C57E56-3EE6-4EF7-873F-7ED084B0EB22" library_target="connector_libfcgi">
|
||||
<target name="connector_libfcgi">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="connector_libfcgi_v0" uuid="5E1C9860-2D9E-4A94-A11D-DA0FD9B31470" library_target="connector_libfcgi_v0">
|
||||
<target name="connector_libfcgi_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="connector_libfcgi" uuid="59C57E56-3EE6-4EF7-873F-7ED084B0EB22" library_target="connector_libfcgi">
|
||||
<target name="connector_libfcgi">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="connector_libfcgi_v0" uuid="5E1C9860-2D9E-4A94-A11D-DA0FD9B31470" library_target="connector_libfcgi_v0">
|
||||
<target name="connector_libfcgi_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="connector_nino" uuid="F91861FB-4FEA-455F-9570-828D7903DC64" library_target="connector_nino">
|
||||
<target name="connector_nino">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="connector_nino_v0" uuid="6E00FB27-C0E2-4859-93A0-BF516C44C95F" library_target="connector_nino_v0">
|
||||
<target name="connector_nino_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="connector_nino" uuid="F91861FB-4FEA-455F-9570-828D7903DC64" library_target="connector_nino">
|
||||
<target name="connector_nino">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="connector_nino_v0" uuid="6E00FB27-C0E2-4859-93A0-BF516C44C95F" library_target="connector_nino_v0">
|
||||
<target name="connector_nino_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="ewsgi" uuid="0A4331F9-4D2B-4474-A9F5-8DBE6655714C" library_target="ewsgi">
|
||||
<target name="ewsgi">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="ewsgi_v0" uuid="0A4331F9-4D2B-4474-A9F5-8DBE6655714C" library_target="ewsgi_v0">
|
||||
<target name="ewsgi_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_libfcgi" uuid="00B169F1-2BE2-4986-8B93-825FEB944FFD" library_target="wsf_libfcgi">
|
||||
<target name="wsf_libfcgi">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_libfcgi_v0" uuid="36DB043B-E4E9-4BB6-936C-3564335C34EF" library_target="wsf_libfcgi_v0">
|
||||
<target name="wsf_libfcgi_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_libfcgi" uuid="00B169F1-2BE2-4986-8B93-825FEB944FFD" library_target="wsf_libfcgi">
|
||||
<target name="wsf_libfcgi">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_libfcgi_v0" uuid="36DB043B-E4E9-4BB6-936C-3564335C34EF" library_target="wsf_libfcgi_v0">
|
||||
<target name="wsf_libfcgi_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="wsf_nino" uuid="BACF0220-900B-4409-8CB2-30A09836A650" library_target="wsf_nino">
|
||||
<target name="wsf_nino">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="wsf_nino_v0" uuid="81525F4F-7BCA-471B-B1E3-2601EFD242E0" library_target="wsf_nino_v0">
|
||||
<target name="wsf_nino_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="wsf_nino" uuid="BACF0220-900B-4409-8CB2-30A09836A650" library_target="wsf_nino">
|
||||
<target name="wsf_nino">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="wsf_nino_v0" uuid="81525F4F-7BCA-471B-B1E3-2601EFD242E0" library_target="wsf_nino_v0">
|
||||
<target name="wsf_nino_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="default_libfcgi" uuid="B853CC3A-D173-4DA4-9832-6D0148C8F01F" library_target="default_libfcgi">
|
||||
<target name="default_libfcgi">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="default_libfcgi_v0" uuid="757C822A-6A23-42E6-9A30-2B0977960E3D" library_target="default_libfcgi_v0">
|
||||
<target name="default_libfcgi_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="default_libfcgi" uuid="B853CC3A-D173-4DA4-9832-6D0148C8F01F" library_target="default_libfcgi">
|
||||
<target name="default_libfcgi">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="default_libfcgi_v0" uuid="757C822A-6A23-42E6-9A30-2B0977960E3D" library_target="default_libfcgi_v0">
|
||||
<target name="default_libfcgi_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="default_nino" uuid="ACBEDC97-956C-45F5-97E3-65A6D9987625" library_target="default_nino">
|
||||
<target name="default_nino">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="default_nino_v0" uuid="D3606AED-7593-460A-94FD-2859C71386FF" library_target="default_nino_v0">
|
||||
<target name="default_nino_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="default_nino" uuid="ACBEDC97-956C-45F5-97E3-65A6D9987625" library_target="default_nino">
|
||||
<target name="default_nino">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="default_nino_v0" uuid="D3606AED-7593-460A-94FD-2859C71386FF" library_target="default_nino_v0">
|
||||
<target name="default_nino_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="wsf" uuid="FB2987AA-926E-4F5D-A04A-407E0415A3FD" library_target="wsf">
|
||||
<target name="wsf">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="wsf_v0" uuid="FB2987AA-926E-4F5D-A04A-407E0415A3FD" library_target="wsf_v0">
|
||||
<target name="wsf_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_extension" uuid="11055B92-CBEF-4272-8B50-0450BDA154E5" library_target="wsf_extension">
|
||||
<target name="wsf_extension">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_extension_v0" uuid="66FC8180-27E6-4335-B571-4D38D3BC633A" library_target="wsf_extension_v0">
|
||||
<target name="wsf_extension_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_extension" uuid="11055B92-CBEF-4272-8B50-0450BDA154E5" library_target="wsf_extension">
|
||||
<target name="wsf_extension">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_extension_v0" uuid="66FC8180-27E6-4335-B571-4D38D3BC633A" library_target="wsf_extension_v0">
|
||||
<target name="wsf_extension_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="wsf_policy_driven" uuid="3FC00449-5101-461D-94C6-10920C30EBF4" library_target="wsf_policy_driven">
|
||||
<target name="wsf_policy_driven">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="wsf_policy_driven_v0" uuid="E175F999-1164-48AA-83E1-6C14FC5E8C82" library_target="wsf_policy_driven_v0">
|
||||
<target name="wsf_policy_driven_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="wsf_policy_driven" uuid="3FC00449-5101-461D-94C6-10920C30EBF4" library_target="wsf_policy_driven">
|
||||
<target name="wsf_policy_driven">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="wsf_policy_driven_v0" uuid="E175F999-1164-48AA-83E1-6C14FC5E8C82" library_target="wsf_policy_driven_v0">
|
||||
<target name="wsf_policy_driven_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_router_context" uuid="1A0F9B0E-26CE-4DE0-BE47-C74D1AB2B389" library_target="wsf_router_context">
|
||||
<target name="wsf_router_context">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_router_context_v0" uuid="BA6468F6-2130-45FC-A2F7-26A7781B09CE" library_target="wsf_router_context_v0">
|
||||
<target name="wsf_router_context_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_router_context" uuid="1A0F9B0E-26CE-4DE0-BE47-C74D1AB2B389" library_target="wsf_router_context">
|
||||
<target name="wsf_router_context">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_router_context_v0" uuid="BA6468F6-2130-45FC-A2F7-26A7781B09CE" library_target="wsf_router_context_v0">
|
||||
<target name="wsf_router_context_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<redirection xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" uuid="C41D0367-9852-4AA7-9E7E-DEA162A4CBB0" location="../../../wsf/wsf_session-safe.ecf">
|
||||
<redirection xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" uuid="74D6AAE4-1AF5-4D5C-B19D-D24383B7DE93" location="../../../wsf/wsf_session-safe.ecf">
|
||||
</redirection>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<redirection xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" uuid="C41D0367-9852-4AA7-9E7E-DEA162A4CBB0" location="../../../wsf/wsf_session.ecf">
|
||||
<redirection xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" uuid="74D6AAE4-1AF5-4D5C-B19D-D24383B7DE93" location="../../../wsf/wsf_session.ecf">
|
||||
</redirection>
|
||||
|
||||
21
library/server/obsolete/v0/wsf_html/wsf_html-safe.ecf
Normal file
21
library/server/obsolete/v0/wsf_html/wsf_html-safe.ecf
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_html_v0" uuid="9D0DC2A2-BE67-4499-B730-87C7DDE25860" library_target="wsf_html_v0">
|
||||
<target name="wsf_html_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="standard">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="encoder" location="../../../../text/encoder/encoder-safe.ecf"/>
|
||||
<library name="uri_template" location="../../../../text/parser/uri_template/uri_template-safe.ecf"/>
|
||||
<library name="wsf" location="..\wsf\wsf-safe.ecf"/>
|
||||
<cluster name="api" location="..\..\..\wsf_html\api\" recursive="true"/>
|
||||
<cluster name="css" location="..\..\..\wsf_html\css\" recursive="true"/>
|
||||
<cluster name="form" location="..\..\..\wsf_html\form\" recursive="true"/>
|
||||
<cluster name="widget" location="..\..\..\wsf_html\widget\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
22
library/server/obsolete/v0/wsf_html/wsf_html.ecf
Normal file
22
library/server/obsolete/v0/wsf_html/wsf_html.ecf
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_html_v0" uuid="9D0DC2A2-BE67-4499-B730-87C7DDE25860" library_target="wsf_html_v0">
|
||||
<target name="wsf_html_v0">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true" full_class_checking="true" void_safety="none" syntax="standard">
|
||||
</option>
|
||||
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="encoder" location="../../../../text/encoder/encoder.ecf"/>
|
||||
<library name="uri_template" location="../../../../text/parser/uri_template/uri_template.ecf"/>
|
||||
<library name="wsf" location="..\wsf\wsf.ecf"/>
|
||||
<cluster name="api" location="..\..\..\wsf_html\api\" recursive="true"/>
|
||||
<cluster name="css" location="..\..\..\wsf_html\css\" recursive="true"/>
|
||||
<cluster name="form" location="..\..\..\wsf_html\form\" recursive="true"/>
|
||||
<cluster name="widget" location="..\..\..\wsf_html\widget\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
39
library/server/wsf/package.iron
Normal file
39
library/server/wsf/package.iron
Normal file
@@ -0,0 +1,39 @@
|
||||
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_all = "connector/all-safe.ecf"
|
||||
wsf_cgi = "connector/cgi-safe.ecf"
|
||||
wsf_cgi = "connector/cgi.ecf"
|
||||
wsf_libfcgi = "connector/libfcgi-safe.ecf"
|
||||
wsf_libfcgi = "connector/libfcgi.ecf"
|
||||
wsf_nino = "connector/nino-safe.ecf"
|
||||
wsf_nino = "connector/nino.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_nino = "default/nino-safe.ecf"
|
||||
default_nino = "default/nino.ecf"
|
||||
default_openshift = "default/openshift-safe.ecf"
|
||||
|
||||
note
|
||||
title: Web Server Foundation
|
||||
description: Core of the Eiffel Web Framework, used to build web server application.
|
||||
tags: ewf,server,httpd,request,connector
|
||||
license: Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)
|
||||
link[license]: https://github.com/EiffelWebFramework/EWF/blob/master/LICENSE
|
||||
link[source]: "Github" https://github.com/EiffelWebFramework/EWF
|
||||
link[doc]: "Documentation" http://eiffelwebframework.github.io/EWF/
|
||||
|
||||
end
|
||||
@@ -11,30 +11,50 @@ inherit
|
||||
|
||||
feature -- Mapping helper: uri
|
||||
|
||||
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_HANDLER)
|
||||
-- Map `h' as handler for `a_uri'
|
||||
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `h' as handler for `a_uri', according to `rqst_methods'.
|
||||
do
|
||||
map_uri_with_request_methods (a_uri, h, Void)
|
||||
router.map (create {WSF_URI_MAPPING}.make (a_uri, h), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_URI_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `h' as handler for `a_uri' for request methods `rqst_methods'.
|
||||
obsolete
|
||||
"Use directly `map_uri' [June/2015]"
|
||||
do
|
||||
router.map_with_request_methods (create {WSF_URI_MAPPING}.make (a_uri, h), rqst_methods)
|
||||
map_uri (a_uri, h, rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_response (a_uri: READABLE_STRING_8; h: WSF_URI_RESPONSE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `h' as response handler for `a_uri' for request methods `rqst_methods'.
|
||||
require
|
||||
h_attached: h /= Void
|
||||
do
|
||||
router.map (create {WSF_URI_MAPPING}.make (a_uri, h), rqst_methods)
|
||||
end
|
||||
|
||||
feature -- Mapping helper: uri agent
|
||||
|
||||
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]])
|
||||
-- Map `proc' as handler for `a_uri'
|
||||
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `proc' as handler for `a_uri', according to `rqst_methods'.
|
||||
do
|
||||
map_uri_agent_with_request_methods (a_uri, proc, Void)
|
||||
map_uri (a_uri, create {WSF_URI_AGENT_HANDLER}.make (proc), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `proc' as handler for `a_uri' for request methods `rqst_methods'.
|
||||
obsolete
|
||||
"Use directly `map_uri_agent' [June/2015]"
|
||||
do
|
||||
map_uri_with_request_methods (a_uri, create {WSF_URI_AGENT_HANDLER}.make (proc), rqst_methods)
|
||||
map_uri_agent (a_uri, proc, rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_response_agent (a_uri: READABLE_STRING_8; a_action: like {WSF_URI_RESPONSE_AGENT_HANDLER}.action; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `a_action' as response handler for `a_uri' for request methods `rqst_methods'.
|
||||
require
|
||||
a_action_attached: a_action /= Void
|
||||
do
|
||||
map_uri_response (a_uri, create {WSF_URI_RESPONSE_AGENT_HANDLER}.make (a_action), rqst_methods)
|
||||
end
|
||||
|
||||
note
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
note
|
||||
description: "Summary description for {WSF_URI_RESPONSE_AGENT_HANDLER}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_URI_RESPONSE_AGENT_HANDLER
|
||||
|
||||
inherit
|
||||
WSF_URI_RESPONSE_HANDLER
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature -- Initialization
|
||||
|
||||
make (act: like action)
|
||||
do
|
||||
action := act
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
action: FUNCTION [ANY, TUPLE [req: WSF_REQUEST], WSF_RESPONSE_MESSAGE]
|
||||
|
||||
feature -- Execution
|
||||
|
||||
response (req: WSF_REQUEST): WSF_RESPONSE_MESSAGE
|
||||
do
|
||||
Result := action.item ([req])
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2012, 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
|
||||
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
|
||||
@@ -11,42 +11,64 @@ inherit
|
||||
|
||||
feature -- Mapping helper: uri template
|
||||
|
||||
map_uri_template (a_tpl: STRING; h: WSF_URI_TEMPLATE_HANDLER)
|
||||
-- Map `h' as handler for `a_tpl'
|
||||
map_uri_template (a_tpl: STRING; h: WSF_URI_TEMPLATE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `h' as handler for `a_tpl', according to `rqst_methods'.
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
map_uri_template_with_request_methods (a_tpl, h, Void)
|
||||
router.map (create {WSF_URI_TEMPLATE_MAPPING}.make (a_tpl, h), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_template_with_request_methods (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `h' as handler for `a_tpl' for request methods `rqst_methods'.
|
||||
obsolete
|
||||
"Use directly `map_uri_template' [June/2015]"
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
router.map_with_request_methods (create {WSF_URI_TEMPLATE_MAPPING}.make (a_tpl, h), rqst_methods)
|
||||
map_uri_template (a_tpl, h, rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_template_response (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_RESPONSE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `h' as response handler for `a_tpl' for request methods `rqst_methods'.
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
router.map (create {WSF_URI_TEMPLATE_MAPPING}.make (a_tpl, h), rqst_methods)
|
||||
end
|
||||
|
||||
feature -- Mapping helper: uri template agent
|
||||
|
||||
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]])
|
||||
-- Map `proc' as handler for `a_tpl'
|
||||
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `proc' as handler for `a_tpl', according to `rqst_methods'.
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_uri_template_agent_with_request_methods (a_tpl, proc, Void)
|
||||
map_uri_template (a_tpl, create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (proc), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_template_agent_with_request_methods (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `proc' as handler for `a_tpl' for request methods `rqst_methods'.
|
||||
obsolete
|
||||
"Use directly `map_uri_template_agent' [June/2015]"
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_uri_template_with_request_methods (a_tpl, create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (proc), rqst_methods)
|
||||
map_uri_template_agent (a_tpl, proc, rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_template_response_agent (a_tpl: READABLE_STRING_8; a_action: like {WSF_URI_TEMPLATE_RESPONSE_AGENT_HANDLER}.action; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `a_action' as response handler for `a_tpl' for request methods `rqst_methods'.
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
a_action_attached: a_action /= Void
|
||||
do
|
||||
map_uri_template_response (a_tpl, create {WSF_URI_TEMPLATE_RESPONSE_AGENT_HANDLER}.make (a_action), rqst_methods)
|
||||
end
|
||||
|
||||
note
|
||||
|
||||
@@ -64,20 +64,24 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Mapping
|
||||
|
||||
map (a_mapping: WSF_ROUTER_MAPPING)
|
||||
-- Map `a_mapping'.
|
||||
map (a_mapping: WSF_ROUTER_MAPPING; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `a_mapping',
|
||||
-- if `rqst_methods' is set, accept only request method in `rqst_methods'.
|
||||
-- if `rqst_method' is Void, accept any request methods.
|
||||
require
|
||||
a_mapping_attached: a_mapping /= Void
|
||||
do
|
||||
map_with_request_methods (a_mapping, Void)
|
||||
extend (create {WSF_ROUTER_ITEM}.make (a_mapping, rqst_methods))
|
||||
end
|
||||
|
||||
map_with_request_methods (a_mapping: WSF_ROUTER_MAPPING; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map `a_mapping' for request methods `rqst_methods'.
|
||||
obsolete
|
||||
"Use directly `map' [June/2015]"
|
||||
require
|
||||
a_mapping_attached: a_mapping /= Void
|
||||
do
|
||||
extend (create {WSF_ROUTER_ITEM}.make_with_request_methods (a_mapping, rqst_methods))
|
||||
map (a_mapping, rqst_methods)
|
||||
end
|
||||
|
||||
import (a_mapping_items: ITERABLE [WSF_ROUTER_ITEM])
|
||||
@@ -116,23 +120,27 @@ feature {WSF_ROUTER} -- Mapping
|
||||
|
||||
feature -- Mapping handler
|
||||
|
||||
handle (a_resource: READABLE_STRING_8; f: WSF_ROUTER_MAPPING_FACTORY)
|
||||
handle (a_resource: READABLE_STRING_8; f: WSF_ROUTER_MAPPING_FACTORY; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map the mapping created by factory `f' for resource `a_resource'.
|
||||
-- if `rqst_methods' is set, accept only request method in `rqst_methods'.
|
||||
-- if `rqst_method' is Void, accept any request methods.
|
||||
require
|
||||
a_resource_attached: a_resource /= Void
|
||||
f_attached: f /= Void
|
||||
do
|
||||
handle_with_request_methods (a_resource, f, Void)
|
||||
map (f.new_mapping (a_resource), rqst_methods)
|
||||
end
|
||||
|
||||
handle_with_request_methods (a_resource: READABLE_STRING_8; f: WSF_ROUTER_MAPPING_FACTORY; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
-- Map the mapping created by factory `f' for resource `a_resource'
|
||||
-- and only for request methods `rqst_methods'
|
||||
obsolete
|
||||
"Use directly `handle' [June/2015]"
|
||||
require
|
||||
a_resource_attached: a_resource /= Void
|
||||
f_attached: f /= Void
|
||||
do
|
||||
map_with_request_methods (f.new_mapping (a_resource), rqst_methods)
|
||||
handle (a_resource, f, rqst_methods)
|
||||
end
|
||||
|
||||
feature -- Basic operations
|
||||
|
||||
@@ -16,19 +16,13 @@ inherit
|
||||
DEBUG_OUTPUT
|
||||
|
||||
create
|
||||
make,
|
||||
make_with_request_methods
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (m: like mapping)
|
||||
make (m: like mapping; r: like request_methods)
|
||||
do
|
||||
mapping := m
|
||||
end
|
||||
|
||||
make_with_request_methods (m: like mapping; r: like request_methods)
|
||||
do
|
||||
make (m)
|
||||
set_request_methods (r)
|
||||
end
|
||||
|
||||
@@ -71,7 +65,7 @@ invariant
|
||||
mapping_attached: mapping /= Void
|
||||
|
||||
note
|
||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -14,42 +14,46 @@ feature -- Access
|
||||
|
||||
feature -- Mapping helper: starts_with
|
||||
|
||||
map_starts_with (a_uri: READABLE_STRING_8; h: WSF_STARTS_WITH_CONTEXT_HANDLER [C])
|
||||
map_starts_with (a_uri: READABLE_STRING_8; h: WSF_STARTS_WITH_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
map_starts_with_request_methods (a_uri, h, Void)
|
||||
router.map (create {WSF_STARTS_WITH_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
||||
end
|
||||
|
||||
map_starts_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_STARTS_WITH_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
obsolete
|
||||
"Use directly `map_starts_with' [June-2015]"
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
router.map_with_request_methods (create {WSF_STARTS_WITH_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
||||
map_starts_with (a_uri, h, rqst_methods)
|
||||
end
|
||||
|
||||
feature -- Mapping helper: starts_with agent
|
||||
|
||||
map_starts_with_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]])
|
||||
map_starts_with_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_starts_with_agent_with_request_methods (a_uri, proc, Void)
|
||||
map_starts_with (a_uri, create {WSF_STARTS_WITH_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||
end
|
||||
|
||||
map_starts_with_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
obsolete
|
||||
"Use directly `map_starts_with_agent' [June-2015]"
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_starts_with_request_methods (a_uri, create {WSF_STARTS_WITH_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||
map_starts_with_agent (a_uri, proc, rqst_methods)
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -14,42 +14,46 @@ feature -- Access
|
||||
|
||||
feature -- Mapping helper: uri
|
||||
|
||||
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C])
|
||||
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
map_uri_with_request_methods (a_uri, h, Void)
|
||||
router.map (create {WSF_URI_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
obsolete
|
||||
"Use directly `map_uri' [June-2015]"
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
router.map_with_request_methods (create {WSF_URI_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
||||
map_uri (a_uri, h, rqst_methods)
|
||||
end
|
||||
|
||||
feature -- Mapping helper: uri agent
|
||||
|
||||
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]])
|
||||
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_uri_agent_with_request_methods (a_uri, proc, Void)
|
||||
map_uri (a_uri, create {WSF_URI_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
obsolete
|
||||
"Use directly `map_uri_agent' [June-2015]"
|
||||
require
|
||||
a_uri_attached: a_uri /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_uri_with_request_methods (a_uri, create {WSF_URI_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||
map_uri_agent (a_uri, proc, rqst_methods)
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -14,42 +14,46 @@ feature -- Access
|
||||
|
||||
feature -- Mapping helper: uri
|
||||
|
||||
map_uri_template (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C])
|
||||
map_uri_template (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
map_uri_template_with_request_methods (a_tpl, h, Void)
|
||||
router.map (create {WSF_URI_TEMPLATE_CONTEXT_MAPPING [C]}.make (a_tpl, h), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_template_with_request_methods (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
obsolete
|
||||
"Use directly `make_uri_template' [June/2015]"
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
h_attached: h /= Void
|
||||
do
|
||||
router.map_with_request_methods (create {WSF_URI_TEMPLATE_CONTEXT_MAPPING [C]}.make (a_tpl, h), rqst_methods)
|
||||
map_uri_template (a_tpl, h, rqst_methods)
|
||||
end
|
||||
|
||||
feature -- Mapping helper: uri agent
|
||||
|
||||
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]])
|
||||
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_uri_template_agent_with_request_methods (a_tpl, proc, Void)
|
||||
map_uri_template (a_tpl, create {WSF_URI_TEMPLATE_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||
end
|
||||
|
||||
map_uri_template_agent_with_request_methods (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||
obsolete
|
||||
"Use directly `make_uri_template_agent' [June/2015]"
|
||||
require
|
||||
a_tpl_attached: a_tpl /= Void
|
||||
proc_attached: proc /= Void
|
||||
do
|
||||
map_uri_template_with_request_methods (a_tpl, create {WSF_URI_TEMPLATE_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||
map_uri_template_agent (a_tpl, proc, rqst_methods)
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -116,7 +116,7 @@ feature -- Output operation
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
copyright: "2011-2015, 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
|
||||
|
||||
@@ -37,6 +37,16 @@ feature -- Basic operation
|
||||
|
||||
feature -- Default service options
|
||||
|
||||
import_service_options (opts: WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||
-- Import service options `opts' into `service_options'.
|
||||
do
|
||||
if attached service_options as l_opts then
|
||||
l_opts.append_options (opts)
|
||||
else
|
||||
service_options := opts
|
||||
end
|
||||
end
|
||||
|
||||
set_service_option (a_name: READABLE_STRING_GENERAL; a_value: detachable ANY)
|
||||
-- Set options related to WSF_SERVICE_LAUNCHER
|
||||
local
|
||||
|
||||
@@ -10,7 +10,8 @@ inherit
|
||||
WGI_EXECUTION
|
||||
rename
|
||||
request as wgi_request,
|
||||
response as wgi_response
|
||||
response as wgi_response,
|
||||
make_from_execution as make_from_wgi_execution
|
||||
redefine
|
||||
make,
|
||||
execute,
|
||||
@@ -23,7 +24,7 @@ inherit
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (req: WGI_REQUEST; res: WGI_RESPONSE)
|
||||
frozen make (req: WGI_REQUEST; res: WGI_RESPONSE)
|
||||
-- Create Current execution with request `req' and response `res'.
|
||||
do
|
||||
Precursor (req, res)
|
||||
@@ -32,6 +33,15 @@ feature {NONE} -- Initialization
|
||||
initialize
|
||||
end
|
||||
|
||||
frozen make_from_execution (a_execution: WSF_EXECUTION)
|
||||
-- Create current execution from `a_execution'.
|
||||
do
|
||||
make_from_wgi_execution (a_execution)
|
||||
request := a_execution.request
|
||||
response := a_execution.response
|
||||
initialize
|
||||
end
|
||||
|
||||
initialize
|
||||
-- Initialize Current object.
|
||||
--| To be redefined if needed.
|
||||
|
||||
40
library/server/wsf/src/wsf_message_execution.e
Normal file
40
library/server/wsf/src/wsf_message_execution.e
Normal file
@@ -0,0 +1,40 @@
|
||||
note
|
||||
description: "[
|
||||
Request execution based on attributes `request' and `response'.
|
||||
And returning the response as a `message'.
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
WSF_MESSAGE_EXECUTION
|
||||
|
||||
inherit
|
||||
WSF_EXECUTION
|
||||
|
||||
feature -- Execution
|
||||
|
||||
execute
|
||||
-- <Precursor>
|
||||
do
|
||||
response.send (message)
|
||||
end
|
||||
|
||||
message: WSF_RESPONSE_MESSAGE
|
||||
-- Message to be sent to the `response'.
|
||||
deferred
|
||||
ensure
|
||||
Result_set: Result /= Void
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, 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
|
||||
@@ -319,8 +319,8 @@ feature -- Header output operation: helpers
|
||||
feature -- Header add cookie
|
||||
|
||||
add_cookie (a_cookie: WSF_COOKIE)
|
||||
-- Add a Set-Cookie header field to the response, iff there is not exist
|
||||
-- a Set-Cookie header field with the same cookie-name.
|
||||
-- Add a Set-Cookie header field to the response,
|
||||
-- if no Set-Cookie header field already use same cookie-name.
|
||||
--| Servers SHOULD NOT include more than one Set-Cookie header field in
|
||||
--| the same response with the same cookie-name.
|
||||
local
|
||||
@@ -328,7 +328,8 @@ feature -- Header add cookie
|
||||
do
|
||||
across
|
||||
internal_header.headers as ic
|
||||
until l_same_cookie_name
|
||||
until
|
||||
l_same_cookie_name
|
||||
loop
|
||||
if ic.item.starts_with ("Set-Cookie:") then
|
||||
l_same_cookie_name := has_cookie_name (ic.item, a_cookie.name)
|
||||
@@ -544,24 +545,29 @@ feature -- Error reporting
|
||||
|
||||
feature {NONE} -- Implemenation
|
||||
|
||||
has_cookie_name (a_cookie_line, a_cookie_name: READABLE_STRING_32 ): BOOLEAN
|
||||
-- Has the cookie line `a_cookie_line', the cookie name `a_cookie_name'?
|
||||
local
|
||||
i,j: INTEGER
|
||||
do
|
||||
Result := False
|
||||
i := a_cookie_line.index_of ('=', 1)
|
||||
has_cookie_name (a_cookie_line, a_cookie_name: READABLE_STRING_GENERAL): BOOLEAN
|
||||
-- Has the cookie line `a_cookie_line', the cookie name `a_cookie_name'?
|
||||
local
|
||||
i,j,n: INTEGER
|
||||
do
|
||||
j := a_cookie_line.index_of (':', 1)
|
||||
|
||||
if i > j and j > 0 then
|
||||
i := i - 1
|
||||
j := j + 1
|
||||
from until not a_cookie_line[j].is_space loop
|
||||
j := j + 1
|
||||
end
|
||||
if a_cookie_name.same_characters (a_cookie_line, j, i, 1) then
|
||||
Result := True
|
||||
end
|
||||
if j > 0 then
|
||||
i := a_cookie_line.index_of ('=', 1)
|
||||
if i > j then
|
||||
i := i - 1
|
||||
j := j + 1
|
||||
-- Skip spaces.
|
||||
from
|
||||
n := a_cookie_line.count
|
||||
until
|
||||
j > n or not a_cookie_line[j].is_space
|
||||
loop
|
||||
j := j + 1
|
||||
end
|
||||
if j > n then
|
||||
Result := a_cookie_name.same_characters (a_cookie_line, j, i, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="wsf" uuid="A37CE5AA-4D2A-4441-BC6A-0A1D7EC49647" library_target="wsf">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="wsf" uuid="A37CE5AA-4D2A-4441-BC6A-0A1D7EC49647" library_target="wsf">
|
||||
<target name="wsf">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
@@ -9,23 +9,23 @@
|
||||
</file_rule>
|
||||
<option warning="true" full_class_checking="true" void_safety="none" syntax="provisional">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/>
|
||||
<mapping old_name="WSF_URI_TEMPLATE_HELPER_FOR_ROUTED_EXECUTION" new_name="WSF_ROUTED_URI_TEMPLATE_HELPER"/>
|
||||
<mapping old_name="WSF_URI_HELPER_FOR_ROUTED_EXECUTION" new_name="WSF_ROUTED_URI_HELPER"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="base_extension" location="$ISE_LIBRARY\library\base_extension\base_extension.ecf"/>
|
||||
<library name="ewsgi" location="..\ewsgi\ewsgi.ecf"/>
|
||||
<library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
|
||||
<library name="error" location="../../utility/general/error/error.ecf"/>
|
||||
<library name="http" location="../../network/protocol/http/http.ecf"/>
|
||||
<library name="conneg" location="..\..\network\protocol\content_negotiation\conneg.ecf"/>
|
||||
<library name="uri_template"
|
||||
location="../../text/parser/uri_template/uri_template.ecf"/>
|
||||
<library name="encoder"
|
||||
location="..\..\text\encoder\encoder.ecf"/>
|
||||
<library name="uri" location="$ISE_LIBRARY\library\text\uri\uri.ecf" readonly="true"/>
|
||||
<cluster name="src" location=".\src" recursive="true"/>
|
||||
<cluster name="router" location=".\router" recursive="true">
|
||||
<library name="encoder" location="..\..\text\encoder\encoder.ecf"/>
|
||||
<library name="error" location="..\..\utility\general\error\error.ecf"/>
|
||||
<library name="ewsgi" location="..\ewsgi\ewsgi.ecf"/>
|
||||
<library name="http" location="..\..\network\protocol\http\http.ecf"/>
|
||||
<library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
|
||||
<library name="uri" location="$ISE_LIBRARY\library\text\uri\uri.ecf"/>
|
||||
<library name="uri_template" location="..\..\text\parser\uri_template\uri_template.ecf"/>
|
||||
<cluster name="router" location=".\router\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/policy_driven$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
<cluster name="src" location=".\src\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
Reference in New Issue
Block a user