Various changes related to new WSF_DEBUG_INFORMATION and WSF_DEBUG_HANDLER.

This commit is contained in:
2014-07-01 19:59:08 +02:00
parent 7dfc6ea67a
commit 446c692f97
3 changed files with 63 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ feature {NONE} -- Initialization
-- Initialize current service. -- Initialize current service.
do do
Precursor Precursor
set_service_option ("verbose", True) -- set_service_option ("verbose", True)
set_service_option ("port", 9090) set_service_option ("port", 9090)
-- set_service_option ("base", "/www-debug/debug_service.fcgi/") -- set_service_option ("base", "/www-debug/debug_service.fcgi/")
end end
@@ -34,6 +34,7 @@ feature {NONE} -- Initialization
local local
dbg: WSF_DEBUG_HANDLER dbg: WSF_DEBUG_HANDLER
do do
res.put_error ("DEBUG" + req.request_uri + "%N")
create dbg.make create dbg.make
dbg.execute_starts_with ("", req, res) dbg.execute_starts_with ("", req, res)
end end

View File

@@ -52,6 +52,7 @@ feature -- Access
p: WSF_PAGE_RESPONSE p: WSF_PAGE_RESPONSE
l_len: INTEGER l_len: INTEGER
dbg: WSF_DEBUG_INFORMATION dbg: WSF_DEBUG_INFORMATION
utf: UTF_CONVERTER
do do
create s.make (2048) create s.make (2048)
s.append ("= EWF DEBUG =") s.append ("= EWF DEBUG =")
@@ -59,6 +60,7 @@ feature -- Access
create dbg.make create dbg.make
dbg.set_is_verbose (True) dbg.set_is_verbose (True)
dbg.append_cgi_variables_to (req, res, s)
dbg.append_information_to (req, res, s) dbg.append_information_to (req, res, s)
s.append ("= END =") s.append ("= END =")

View File

@@ -135,7 +135,7 @@ feature -- Execution
append_meta_variables_to (req, res, a_output) append_meta_variables_to (req, res, a_output)
if is_verbose then if is_verbose then
append_execution_variables_to (req, res, a_output) append_execution_variables_to (req, res, a_output)
append_environment_variables_to (req, res, a_output) -- append_environment_variables_to (req, res, a_output)
end end
end end
@@ -292,7 +292,11 @@ feature {NONE} -- Implementation
a_output.append_character ('}') a_output.append_character ('}')
end end
a_output.append_character ('=') a_output.append_character ('=')
if attached {WSF_STRING} c.item as l_str then
s := l_str.url_encoded_value
else
s := c.item.string_representation s := c.item.string_representation
end
if s.is_valid_as_string_8 then if s.is_valid_as_string_8 then
v := s.as_string_8 v := s.as_string_8
else else
@@ -321,6 +325,59 @@ feature {NONE} -- Implementation
end end
end end
append_iterable_string_to (a_title: READABLE_STRING_8; it: detachable TABLE_ITERABLE [READABLE_STRING_8, READABLE_STRING_GENERAL]; a_output: STRING_8)
local
n: INTEGER
v: READABLE_STRING_8
utf: UTF_CONVERTER
do
if is_verbose then
a_output.append (a_title)
a_output.append_character (':')
end
if it /= Void then
n := iterable_count (it)
if n = 0 then
if is_verbose then
a_output.append (" empty")
a_output.append (eol)
end
else
a_output.append (eol)
across
it as c
loop
a_output.append (" - ")
if c.key.is_valid_as_string_8 then
a_output.append (c.key.as_string_8)
else
a_output.append (utf.utf_32_string_to_utf_8_string_8 (c.key))
end
a_output.append_character ('=')
v := c.item
if v.has ('%N') then
a_output.append (eol)
across
v.split ('%N') as v_cursor
loop
a_output.append (" |")
a_output.append (v_cursor.item)
a_output.append (eol)
end
else
a_output.append (v)
a_output.append (eol)
end
end
end
else
if is_verbose then
a_output.append (" none")
a_output.append (eol)
end
end
end
feature -- Constants feature -- Constants
eol: STRING = "%N" eol: STRING = "%N"