changed prefix GW_ into EWF_ for EiffelWebFramework
use READABLE_STRING_GENERAL instead of just STRING
This commit is contained in:
@@ -21,7 +21,7 @@ feature -- Helper
|
||||
local
|
||||
s, uri_s: detachable STRING
|
||||
i, n: INTEGER
|
||||
h: GW_HEADER
|
||||
h: EWF_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.unsupported_media_type)
|
||||
|
||||
@@ -53,7 +53,7 @@ feature -- Execution
|
||||
|
||||
execute_default (req: EWSGI_REQUEST; res: EWSGI_RESPONSE_BUFFER)
|
||||
local
|
||||
h: GW_HEADER
|
||||
h: EWF_HEADER
|
||||
l_url: STRING
|
||||
e: EXECUTION_ENVIRONMENT
|
||||
n: INTEGER
|
||||
@@ -120,7 +120,7 @@ feature -- Execution
|
||||
local
|
||||
l_response_content_type: detachable STRING
|
||||
msg: STRING
|
||||
h: GW_HEADER
|
||||
h: EWF_HEADER
|
||||
content_type_supported: ARRAY [STRING]
|
||||
do
|
||||
if a_name /= Void then
|
||||
|
||||
@@ -27,27 +27,27 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
path_variables: HASH_TABLE [STRING, STRING]
|
||||
path_variables: HASH_TABLE [STRING, READABLE_STRING_GENERAL]
|
||||
-- Variables being part of the path segments
|
||||
|
||||
query_variables: HASH_TABLE [STRING, STRING]
|
||||
query_variables: HASH_TABLE [STRING, READABLE_STRING_GENERAL]
|
||||
-- Variables being part of the query segments (i.e: after the ?)
|
||||
|
||||
feature -- Query
|
||||
|
||||
path_variable (n: STRING): detachable STRING
|
||||
path_variable (n: READABLE_STRING_GENERAL): detachable STRING
|
||||
-- Value related to query variable name `n'
|
||||
do
|
||||
Result := path_variables.item (n)
|
||||
end
|
||||
|
||||
query_variable (n: STRING): detachable STRING
|
||||
query_variable (n: READABLE_STRING_GENERAL): detachable STRING
|
||||
-- Value related to path variable name `n'
|
||||
do
|
||||
Result := query_variables.item (n)
|
||||
end
|
||||
|
||||
variable (n: STRING): detachable STRING
|
||||
variable (n: READABLE_STRING_GENERAL): detachable STRING
|
||||
-- Value related to variable name `n'
|
||||
do
|
||||
Result := query_variable (n)
|
||||
@@ -58,7 +58,7 @@ feature -- Query
|
||||
|
||||
feature -- Query: url-decoded
|
||||
|
||||
url_decoded_query_variable (n: STRING): detachable STRING_32
|
||||
url_decoded_query_variable (n: READABLE_STRING_GENERAL): detachable STRING_32
|
||||
-- Unencoded value related to variable name `n'
|
||||
do
|
||||
if attached query_variable (n) as v then
|
||||
@@ -66,7 +66,7 @@ feature -- Query: url-decoded
|
||||
end
|
||||
end
|
||||
|
||||
url_decoded_path_variable (n: STRING): detachable STRING_32
|
||||
url_decoded_path_variable (n: READABLE_STRING_GENERAL): detachable STRING_32
|
||||
-- Unencoded value related to variable name `n'
|
||||
do
|
||||
if attached path_variable (n) as v then
|
||||
@@ -74,7 +74,7 @@ feature -- Query: url-decoded
|
||||
end
|
||||
end
|
||||
|
||||
url_decoded_variable (n: STRING): detachable STRING_32
|
||||
url_decoded_variable (n: READABLE_STRING_GENERAL): detachable STRING_32
|
||||
-- Unencoded value related to variable name `n'
|
||||
do
|
||||
if attached variable (n) as v then
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
note
|
||||
description: "Summary description for {GW_CGI_CONNECTOR}."
|
||||
description: "Summary description for {EWF_CGI_CONNECTOR}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_CGI_CONNECTOR
|
||||
EWF_CGI_CONNECTOR
|
||||
|
||||
inherit
|
||||
EWSGI_CONNECTOR
|
||||
@@ -20,8 +20,8 @@ feature -- Execution
|
||||
req: EWSGI_REQUEST_FROM_TABLE
|
||||
res: EWSGI_RESPONSE_STREAM_BUFFER
|
||||
do
|
||||
create req.make ((create {EXECUTION_ENVIRONMENT}).starting_environment_variables, create {GW_CGI_INPUT_STREAM}.make)
|
||||
create res.make (create {GW_CGI_OUTPUT_STREAM}.make)
|
||||
create req.make ((create {EXECUTION_ENVIRONMENT}).starting_environment_variables, create {EWF_CGI_INPUT_STREAM}.make)
|
||||
create res.make (create {EWF_CGI_OUTPUT_STREAM}.make)
|
||||
application.process (req, res)
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_CGI_INPUT_STREAM
|
||||
EWF_CGI_INPUT_STREAM
|
||||
|
||||
inherit
|
||||
EWSGI_INPUT_STREAM
|
||||
@@ -6,7 +6,7 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_CGI_OUTPUT_STREAM
|
||||
EWF_CGI_OUTPUT_STREAM
|
||||
|
||||
inherit
|
||||
EWSGI_OUTPUT_STREAM
|
||||
@@ -1,12 +1,12 @@
|
||||
note
|
||||
description: "Summary description for {GW_LIBFCGI_CONNECTOR}."
|
||||
description: "Summary description for {EWF_LIBFCGI_CONNECTOR}."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_LIBFCGI_CONNECTOR
|
||||
EWF_LIBFCGI_CONNECTOR
|
||||
|
||||
inherit
|
||||
EWSGI_CONNECTOR
|
||||
@@ -22,8 +22,8 @@ feature {NONE} -- Initialization
|
||||
initialize
|
||||
do
|
||||
create fcgi.make
|
||||
create {GW_LIBFCGI_INPUT_STREAM} input.make (fcgi)
|
||||
create {GW_LIBFCGI_OUTPUT_STREAM} output.make (fcgi)
|
||||
create {EWF_LIBFCGI_INPUT_STREAM} input.make (fcgi)
|
||||
create {EWF_LIBFCGI_OUTPUT_STREAM} output.make (fcgi)
|
||||
end
|
||||
|
||||
feature -- Server
|
||||
@@ -6,7 +6,7 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_LIBFCGI_INPUT_STREAM
|
||||
EWF_LIBFCGI_INPUT_STREAM
|
||||
|
||||
inherit
|
||||
EWSGI_INPUT_STREAM
|
||||
@@ -1,12 +1,12 @@
|
||||
note
|
||||
description: "Summary description for {GW_LIBFCGI_OUTPUT_STREAM}."
|
||||
description: "Summary description for {EWF_LIBFCGI_OUTPUT_STREAM}."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_LIBFCGI_OUTPUT_STREAM
|
||||
EWF_LIBFCGI_OUTPUT_STREAM
|
||||
|
||||
inherit
|
||||
EWSGI_OUTPUT_STREAM
|
||||
@@ -1,11 +1,11 @@
|
||||
note
|
||||
description: "Summary description for {GW_NINO_CONNECTOR}."
|
||||
description: "Summary description for {EWF_NINO_CONNECTOR}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_NINO_CONNECTOR
|
||||
EWF_NINO_CONNECTOR
|
||||
|
||||
inherit
|
||||
EWSGI_CONNECTOR
|
||||
@@ -62,7 +62,7 @@ feature -- Server
|
||||
local
|
||||
l_http_handler : HTTP_HANDLER
|
||||
do
|
||||
create {GW_NINO_HANDLER} l_http_handler.make_with_callback (server, "NINO_HANDLER", Current)
|
||||
create {EWF_NINO_HANDLER} l_http_handler.make_with_callback (server, "NINO_HANDLER", Current)
|
||||
debug ("nino")
|
||||
if attached base as l_base then
|
||||
print ("Base=" + l_base + "%N")
|
||||
@@ -76,8 +76,8 @@ feature -- Server
|
||||
req: EWSGI_REQUEST_FROM_TABLE
|
||||
res: EWSGI_RESPONSE_STREAM_BUFFER
|
||||
do
|
||||
create req.make (env, create {GW_NINO_INPUT_STREAM}.make (a_input))
|
||||
create res.make (create {GW_NINO_OUTPUT_STREAM}.make (a_output))
|
||||
create req.make (env, create {EWF_NINO_INPUT_STREAM}.make (a_input))
|
||||
create res.make (create {EWF_NINO_OUTPUT_STREAM}.make (a_output))
|
||||
req.set_meta_parameter ("RAW_HEADER_DATA", a_headers_text)
|
||||
application.execute (req, res)
|
||||
end
|
||||
@@ -5,7 +5,7 @@ note
|
||||
revision : "$Revision$"
|
||||
|
||||
class
|
||||
GW_NINO_HANDLER
|
||||
EWF_NINO_HANDLER
|
||||
|
||||
inherit
|
||||
HTTP_CONNECTION_HANDLER
|
||||
@@ -23,7 +23,7 @@ feature {NONE} -- Initialization
|
||||
callback := a_callback
|
||||
end
|
||||
|
||||
callback: GW_NINO_CONNECTOR
|
||||
callback: EWF_NINO_CONNECTOR
|
||||
|
||||
feature -- Access
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
note
|
||||
description: "Summary description for {GW_NINO_INPUT_STREAM}."
|
||||
description: "Summary description for {EWF_NINO_INPUT_STREAM}."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_NINO_INPUT_STREAM
|
||||
EWF_NINO_INPUT_STREAM
|
||||
|
||||
inherit
|
||||
EWSGI_INPUT_STREAM
|
||||
@@ -22,7 +22,7 @@ feature {NONE} -- Initialization
|
||||
set_nino_input (a_nino_input)
|
||||
end
|
||||
|
||||
feature {GW_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino
|
||||
feature {EWF_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino
|
||||
|
||||
set_nino_input (i: like nino_input)
|
||||
do
|
||||
@@ -1,12 +1,12 @@
|
||||
note
|
||||
description: "Summary description for {GW_NINO_OUTPUT_STREAM}."
|
||||
description: "Summary description for {EWF_NINO_OUTPUT_STREAM}."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_NINO_OUTPUT_STREAM
|
||||
EWF_NINO_OUTPUT_STREAM
|
||||
|
||||
inherit
|
||||
EWSGI_OUTPUT_STREAM
|
||||
@@ -26,7 +26,7 @@ feature {NONE} -- Initialization
|
||||
set_nino_output (a_nino_output)
|
||||
end
|
||||
|
||||
feature {GW_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino
|
||||
feature {EWF_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino
|
||||
|
||||
set_nino_output (o: like nino_output)
|
||||
do
|
||||
@@ -27,7 +27,7 @@ feature {NONE} -- Implementation
|
||||
create connector.make_with_base (app, a_base_url)
|
||||
end
|
||||
|
||||
connector: GW_NINO_CONNECTOR
|
||||
connector: EWF_NINO_CONNECTOR
|
||||
-- Web server connector
|
||||
|
||||
feature -- Status settings
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
note
|
||||
description: "Summary description for {GW_BUFFERED_RESPONSE}."
|
||||
description: "Summary description for {EWF_BUFFERED_RESPONSE}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_BUFFERED_RESPONSE
|
||||
EWF_BUFFERED_RESPONSE
|
||||
|
||||
inherit
|
||||
EWSGI_RESPONSE_BUFFER
|
||||
@@ -130,7 +130,7 @@ feature -- Header output operation
|
||||
write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]])
|
||||
-- Send headers with status `a_status', and headers from `a_headers'
|
||||
local
|
||||
h: GW_HEADER
|
||||
h: EWF_HEADER
|
||||
i,n: INTEGER
|
||||
do
|
||||
set_status_code (a_status_code)
|
||||
@@ -1,10 +1,10 @@
|
||||
note
|
||||
description: "Summary description for {GW_IN_MEMORY_RESPONSE}."
|
||||
description: "Summary description for {EWF_IN_MEMORY_RESPONSE}."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_IN_MEMORY_RESPONSE
|
||||
EWF_IN_MEMORY_RESPONSE
|
||||
|
||||
inherit
|
||||
EWSGI_RESPONSE_BUFFER
|
||||
@@ -23,7 +23,7 @@ feature {NONE} -- Initialization
|
||||
|
||||
response_buffer: EWSGI_RESPONSE_BUFFER
|
||||
|
||||
header: GW_HEADER
|
||||
header: EWF_HEADER
|
||||
|
||||
body: STRING_8
|
||||
|
||||
@@ -93,7 +93,7 @@ feature -- Header output operation
|
||||
write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]])
|
||||
-- Send headers with status `a_status', and headers from `a_headers'
|
||||
local
|
||||
h: GW_HEADER
|
||||
h: EWF_HEADER
|
||||
i,n: INTEGER
|
||||
do
|
||||
set_status_code (a_status_code)
|
||||
@@ -1,11 +1,11 @@
|
||||
note
|
||||
description: "Summary description for {GW_IN_MEMORY_RESPONSE_APPLICATION}."
|
||||
description: "Summary description for {EWF_IN_MEMORY_RESPONSE_APPLICATION}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
GW_IN_MEMORY_RESPONSE_APPLICATION
|
||||
EWF_IN_MEMORY_RESPONSE_APPLICATION
|
||||
|
||||
inherit
|
||||
EWSGI_APPLICATION
|
||||
@@ -41,9 +41,9 @@ feature -- Execute
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
new_response (req: EWSGI_REQUEST; a_res: EWSGI_RESPONSE_BUFFER): GW_IN_MEMORY_RESPONSE
|
||||
new_response (req: EWSGI_REQUEST; a_res: EWSGI_RESPONSE_BUFFER): EWF_IN_MEMORY_RESPONSE
|
||||
do
|
||||
create {GW_IN_MEMORY_RESPONSE} Result.make (a_res)
|
||||
create {EWF_IN_MEMORY_RESPONSE} Result.make (a_res)
|
||||
end
|
||||
|
||||
note
|
||||
@@ -1103,7 +1103,7 @@ feature {NONE} -- Implementation
|
||||
report_bad_request_error (a_message: detachable STRING)
|
||||
-- Report error
|
||||
local
|
||||
e: GW_ERROR
|
||||
e: EWF_ERROR
|
||||
do
|
||||
create e.make ({HTTP_STATUS_CODE}.bad_request)
|
||||
if a_message /= Void then
|
||||
|
||||
@@ -85,7 +85,7 @@ feature -- Header output operation
|
||||
write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]])
|
||||
-- Send headers with status `a_status', and headers from `a_headers'
|
||||
local
|
||||
h: GW_HEADER
|
||||
h: EWF_HEADER
|
||||
i,n: INTEGER
|
||||
do
|
||||
set_status_code (a_status_code)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
note
|
||||
description: "Summary description for {GW_ERROR}."
|
||||
description: "Summary description for {EWF_ERROR}."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_ERROR
|
||||
EWF_ERROR
|
||||
|
||||
inherit
|
||||
ERROR
|
||||
@@ -1,6 +1,6 @@
|
||||
note
|
||||
description: "[
|
||||
Summary description for {GW_HEADER}.
|
||||
Summary description for {EWF_HEADER}.
|
||||
|
||||
Note the return status code is not part of the HTTP header
|
||||
]"
|
||||
@@ -10,7 +10,7 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_HEADER
|
||||
EWF_HEADER
|
||||
|
||||
inherit
|
||||
ANY
|
||||
@@ -61,18 +61,18 @@ feature -- Access
|
||||
|
||||
feature -- Query
|
||||
|
||||
path_parameter (a_name: STRING): detachable READABLE_STRING_32
|
||||
path_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
-- Parameter value for path variable `a_name'
|
||||
deferred
|
||||
end
|
||||
|
||||
query_parameter (a_name: STRING): detachable READABLE_STRING_32
|
||||
query_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
-- Parameter value for query variable `a_name'
|
||||
--| i.e after the ? character
|
||||
deferred
|
||||
end
|
||||
|
||||
parameter (a_name: STRING): detachable READABLE_STRING_32
|
||||
parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
-- Any parameter value for variable `a_name'
|
||||
-- URI template parameter and query parameters
|
||||
do
|
||||
|
||||
@@ -23,11 +23,11 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Query
|
||||
|
||||
path_parameter (a_name: STRING): detachable STRING_32
|
||||
path_parameter (a_name: READABLE_STRING_GENERAL): detachable STRING_32
|
||||
do
|
||||
end
|
||||
|
||||
query_parameter (a_name: STRING): detachable READABLE_STRING_32
|
||||
query_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
do
|
||||
Result := request.parameter (a_name)
|
||||
end
|
||||
|
||||
@@ -31,12 +31,12 @@ feature -- Access
|
||||
|
||||
feature -- Query
|
||||
|
||||
path_parameter (a_name: STRING): detachable READABLE_STRING_32
|
||||
path_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
do
|
||||
Result := uri_template_match.url_decoded_path_variable (a_name)
|
||||
end
|
||||
|
||||
query_parameter (a_name: STRING): detachable READABLE_STRING_32
|
||||
query_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
do
|
||||
Result := uri_template_match.url_decoded_query_variable (a_name)
|
||||
if Result = Void then
|
||||
|
||||
Reference in New Issue
Block a user