Compare commits

...

5 Commits
pr177 ... v0

Author SHA1 Message Date
5b625892aa Updated installation location of openid and http_authorization in ISE package.
Added iron package file for ewsgi.
2015-08-24 16:45:36 +02:00
jvelilla
b1c21a1723 Fixed typo: Aug instead of Aou. 2015-08-24 16:43:35 +02:00
2eb3d16369 Fixing script_url' that wrongly used path_info' instead of `percent_encoded_path_info'.
(issue on script_url when path info contains unicode character).
2015-08-24 16:42:08 +02:00
93265f8bdf Updated set_value for WSF_FORM_SELECTABLE_INPUT (for example a checkbox).
Call the feature set_checked_by_value iff the the current value exist in the
list of values, in other case set checked in Flase.
If we call set_checked_by_value without filter, previous checked values will be
set in False.
2015-08-24 16:41:57 +02:00
21d32ac2c5 Improved code related to cookie management (avoid duplicated cookie). 2015-08-24 16:41:19 +02:00
7 changed files with 72 additions and 33 deletions

View File

@@ -361,7 +361,7 @@ feature {NONE} -- Implementation
when 5 then s.append ("May")
when 6 then s.append ("Jun")
when 7 then s.append ("Jul")
when 8 then s.append ("Aou")
when 8 then s.append ("Aug")
when 9 then s.append ("Sep")
when 10 then s.append ("Oct")
when 11 then s.append ("Nov")
@@ -487,7 +487,7 @@ feature {NONE} -- Implementation
elseif l_mmm.same_string ("MAY") then l_mo := 05
elseif l_mmm.same_string ("JUN") then l_mo := 06
elseif l_mmm.same_string ("JUL") then l_mo := 07
elseif l_mmm.same_string ("AOU") then l_mo := 08
elseif l_mmm.same_string ("AUG") then l_mo := 08
elseif l_mmm.same_string ("SEP") then l_mo := 09
elseif l_mmm.same_string ("OCT") then l_mo := 10
elseif l_mmm.same_string ("NOV") then l_mo := 11
@@ -718,7 +718,7 @@ feature {NONE} -- Implementation
elseif l_mmm.same_string ("MAY") then l_mo := 05
elseif l_mmm.same_string ("JUN") then l_mo := 06
elseif l_mmm.same_string ("JUL") then l_mo := 07
elseif l_mmm.same_string ("AOU") then l_mo := 08
elseif l_mmm.same_string ("AUG") then l_mo := 08
elseif l_mmm.same_string ("SEP") then l_mo := 09
elseif l_mmm.same_string ("OCT") then l_mo := 10
elseif l_mmm.same_string ("NOV") then l_mo := 11
@@ -905,7 +905,7 @@ feature {NONE} -- Implementation
invariant
note
copyright: "2011-2013, Jocelyn Fiat, Eiffel Software and others"
copyright: "2011-2015, Jocelyn Fiat, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View 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

View File

@@ -1902,7 +1902,7 @@ feature -- URL Utility
elseif spos > 0 then
i := spos
end
spos := l_rq_uri.substring_index (path_info, i)
spos := l_rq_uri.substring_index (percent_encoded_path_info, i)
if spos > 0 then
l_base_url := l_rq_uri.substring (1, spos - 1)
else

View File

@@ -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

View File

@@ -72,18 +72,28 @@ feature -- Change
set_value (v: detachable WSF_VALUE)
-- Set value `v' if applicable to Current
local
l_found: BOOLEAN
do
if attached {ITERABLE [WSF_VALUE]} v as lst then
across
lst as c
until
l_found
loop
set_checked_by_value (c.item)
if attached {WSF_STRING} c.item as s and then is_same_value (s.value) then
set_checked_by_value (c.item)
l_found := True
end
end
if not l_found then
set_checked (False)
end
else
set_checked_by_value (v)
Precursor (v)
end
end
end
feature {NONE} -- Implementation

View File

@@ -79,12 +79,12 @@ echo Install library: http
echo Install library: content_negotiation
%COPYCMD% %TMP_DIR%\library\network\protocol\content_negotiation %TMP_CONTRIB_DIR%\library\network\protocol\content_negotiation
echo Install library: http_authorization
%SAFE_MD% %TMP_CONTRIB_DIR%\library\network\authentication
%COPYCMD% %TMP_DIR%\library\server\authentication\http_authorization %TMP_CONTRIB_DIR%\library\network\authentication\http_authorization
%SAFE_MD% %TMP_CONTRIB_DIR%\library\web\authentication
%COPYCMD% %TMP_DIR%\library\server\authentication\http_authorization %TMP_CONTRIB_DIR%\library\web\authentication\http_authorization
echo Install library: openid
%SAFE_MD% %TMP_CONTRIB_DIR%\library\security
%COPYCMD% %TMP_DIR%\library\security\openid %TMP_CONTRIB_DIR%\library\security\openid
%SAFE_MD% %TMP_CONTRIB_DIR%\library\web\authentication
%COPYCMD% %TMP_DIR%\library\security\openid %TMP_CONTRIB_DIR%\library\web\authentication\openid
echo Install library: uri_template
%COPYCMD% %TMP_DIR%\library\text\parser\uri_template %TMP_CONTRIB_DIR%\library\text\parser\uri_template

View File

@@ -57,9 +57,9 @@ echo Uninstall library: http
echo Uninstall library: content_negotiation
%RDCMD% %TMP_CONTRIB_DIR%\library\network\protocol\content_negotiation
echo Uninstall library: http_authorization
%RDCMD% %TMP_CONTRIB_DIR%\library\network\authentication\http_authorization
%RDCMD% %TMP_CONTRIB_DIR%\library\web\authentication\http_authorization
echo Uninstall library: security\openid
%RDCMD% %TMP_CONTRIB_DIR%\library\security\openid
%RDCMD% %TMP_CONTRIB_DIR%\library\web\authentication\openid
echo Uninstall library: uri_template
%RDCMD% %TMP_CONTRIB_DIR%\library\text\parser\uri_template
echo Uninstall library: runtime\process\notification_email