Web form:
- Improvement about web form manipulation (remove a field, set a text value to input fields by name, ...) - Improved web form html generation, especially for select and type checkbox - Updated the date input field interface with a new set_date_value . File response: - "application/force-download" is not a standard MIME content type, so use "application_octet_stream" instead as default. Standalone connector: - Added expected creation procedure for the service launcher. - Added new "secure_port" configuration variable, for SSL standalone service. This way, if `is_secure` is True, the server will use `secure_port` (overrides `port` value). Date: - Improved support for RFC 3339 (a profile of ISO 8601) Removed obsolete and warnings: - removed usage of FILE_NAME - updated code to avoid implicit conversion from STRING_32 to STRING_8 - avoid uneed conversion to STRING_8 (when possible)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
note
|
||||
description: "Filter implementing debug output in error stream, or `output' file."
|
||||
date: "$Date: 2013-05-23 21:54:29 +0200 (jeu., 23 mai 2013) $"
|
||||
revision: "$Revision: 92585 $"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_DEBUG_FILTER
|
||||
@@ -72,7 +72,7 @@ feature -- Basic operations
|
||||
s.append (c.item.generating_type.name)
|
||||
s.append_character ('}')
|
||||
s.append_character ('=')
|
||||
s.append (c.item.debug_output.as_string_8)
|
||||
s.append ({UTF_CONVERTER}.utf_32_string_to_utf_8_string_8 (c.item.debug_output))
|
||||
s.append_character ('%N')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -99,7 +99,6 @@ feature -- Execution
|
||||
fut: FILE_UTILITIES
|
||||
proc: BASE_PROCESS
|
||||
l_input_env: STRING_TABLE [READABLE_STRING_GENERAL]
|
||||
l_input_header: detachable STRING
|
||||
l_input_buf: STRING
|
||||
l_output: STRING
|
||||
l_output_header_sent: BOOLEAN
|
||||
@@ -107,10 +106,6 @@ feature -- Execution
|
||||
s: STRING
|
||||
i, j, n: INTEGER
|
||||
do
|
||||
-- Header
|
||||
if attached req.raw_header_data as l_header then
|
||||
l_input_header := l_header
|
||||
end
|
||||
-- Input data
|
||||
create l_input_buf.make (req.content_length_value.to_integer_32)
|
||||
req.read_input_data_into (l_input_buf)
|
||||
@@ -126,7 +121,7 @@ feature -- Execution
|
||||
check supported: False end
|
||||
end
|
||||
end
|
||||
-- No need to import `l_input_header` in environment
|
||||
-- No need to import input_header in environment
|
||||
-- As current connector already did the job.
|
||||
if
|
||||
attached cgi_request_data (req) as d and then
|
||||
@@ -149,7 +144,7 @@ feature -- Execution
|
||||
if proc.launched then
|
||||
-- Do not send the header to CGI script
|
||||
-- value are passed via environment variables
|
||||
-- proc.put_string (l_input_header)
|
||||
-- proc.put_string (input_header)
|
||||
-- Send payload.
|
||||
proc.put_string (l_input_buf)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Handler returning debug information."
|
||||
|
||||
date: "$Date: 2013-06-28 16:14:02 +0200 (ven., 28 juin 2013) $"
|
||||
revision: "$Revision: 92754 $"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_DEBUG_HANDLER
|
||||
|
||||
@@ -53,7 +53,11 @@ feature -- Helper
|
||||
i := i + 1
|
||||
end
|
||||
end
|
||||
res.put_header ({HTTP_STATUS_CODE}.unsupported_media_type, << ["Content-Type", "text/plain"], ["Accept", accept_s]>>)
|
||||
res.put_header ({HTTP_STATUS_CODE}.unsupported_media_type,
|
||||
{ARRAY [TUPLE [READABLE_STRING_8, READABLE_STRING_8]]} <<
|
||||
["Content-Type", "text/plain"], ["Accept", accept_s]
|
||||
>>
|
||||
)
|
||||
if accept_s /= Void then
|
||||
res.put_string ("Unsupported request content-type, Accept: " + accept_s + "%N")
|
||||
end
|
||||
@@ -76,7 +80,8 @@ feature -- Helper
|
||||
end
|
||||
s.append_string (c.item)
|
||||
end
|
||||
res.put_header ({HTTP_STATUS_CODE}.method_not_allowed, <<
|
||||
res.put_header ({HTTP_STATUS_CODE}.method_not_allowed,
|
||||
{ARRAY [TUPLE [READABLE_STRING_8, READABLE_STRING_8]]} <<
|
||||
["Content-Type", {HTTP_MIME_TYPES}.text_plain],
|
||||
["Allow", s]
|
||||
>>)
|
||||
|
||||
@@ -100,7 +100,7 @@ feature -- Execution
|
||||
do
|
||||
a_output.append ("CGI variables:")
|
||||
a_output.append (eol)
|
||||
a_output.append (req.cgi_variables.debug_output)
|
||||
append_unicode (req.cgi_variables.debug_output, a_output)
|
||||
a_output.append (eol)
|
||||
a_output.append (eol)
|
||||
end
|
||||
|
||||
@@ -18,13 +18,13 @@ inherit
|
||||
|
||||
feature -- Url Query
|
||||
|
||||
script_absolute_url (req: WSF_REQUEST; a_path: STRING): STRING
|
||||
script_absolute_url (req: WSF_REQUEST; a_path: READABLE_STRING_8): READABLE_STRING_8
|
||||
-- Absolute Url for the script if any, extended by `a_path'
|
||||
do
|
||||
Result := req.absolute_script_url (a_path)
|
||||
end
|
||||
|
||||
script_url (req: WSF_REQUEST; a_path: STRING): STRING
|
||||
script_url (req: WSF_REQUEST; a_path: READABLE_STRING_8): READABLE_STRING_8
|
||||
-- Url relative to script name if any, extended by `a_path'
|
||||
require
|
||||
a_path_attached: a_path /= Void
|
||||
@@ -32,11 +32,12 @@ feature -- Url Query
|
||||
Result := req.script_url (a_path)
|
||||
end
|
||||
|
||||
url (req: WSF_REQUEST; a_path: STRING; args: detachable STRING; abs: BOOLEAN): STRING
|
||||
url (req: WSF_REQUEST; a_path: READABLE_STRING_8; args: detachable READABLE_STRING_8; abs: BOOLEAN): READABLE_STRING_8
|
||||
-- Associated url based on `path' and `args'
|
||||
-- if `abs' then return absolute url
|
||||
local
|
||||
s,t: detachable STRING
|
||||
s: detachable READABLE_STRING_8
|
||||
t: detachable STRING_8
|
||||
do
|
||||
s := args
|
||||
if s /= Void and then s.count > 0 then
|
||||
|
||||
@@ -24,19 +24,19 @@ feature -- Request
|
||||
|
||||
feature -- Url Query
|
||||
|
||||
script_absolute_url (a_path: STRING): STRING
|
||||
script_absolute_url (a_path: STRING): READABLE_STRING_8
|
||||
-- Absolute Url for the script if any, extended by `a_path'
|
||||
do
|
||||
Result := utility.script_absolute_url (request, a_path)
|
||||
end
|
||||
|
||||
script_url (a_path: STRING): STRING
|
||||
script_url (a_path: STRING): READABLE_STRING_8
|
||||
-- Url relative to script name if any, extended by `a_path'
|
||||
do
|
||||
Result := utility.script_url (request, a_path)
|
||||
end
|
||||
|
||||
url (args: detachable STRING; abs: BOOLEAN): STRING
|
||||
url (args: detachable STRING; abs: BOOLEAN): READABLE_STRING_8
|
||||
-- Associated url based on `path' and `args'
|
||||
-- if `abs' then return absolute url
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user