Extracting HTTP_HEADER_BUILDER from HTTP_HEADER

to provide useful interface on WSF_RESPONSE,
  and make WSF_SESSION easier to use.
This commit is contained in:
2014-03-17 18:10:55 +01:00
parent a2cbcbbbc6
commit 718cebc700
6 changed files with 729 additions and 529 deletions

View File

@@ -0,0 +1,63 @@
note
description: "Summary description for {WSF_RESPONSE_HEADER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_RESPONSE_HEADER
inherit
HTTP_HEADER_BUILDER
WSF_RESPONSE_EXPORTER -- to access WSF_RESPONSE.internal_header
create
make_with_response
feature {NONE} -- Initialization
make_with_response (res: WSF_RESPONSE)
do
response := res
end
feature -- Access
response: WSF_RESPONSE
feature -- Access
new_cursor: INDEXABLE_ITERATION_CURSOR [READABLE_STRING_8]
-- Fresh cursor associated with current structure.
do
Result := response.internal_header.new_cursor
end
feature -- Header change: core
add_header (h: READABLE_STRING_8)
-- Add header `h'
-- if it already exists, there will be multiple header with same name
-- which can also be valid
do
response.add_header_line (h)
end
put_header (h: READABLE_STRING_8)
-- Add header `h' or replace existing header of same header name
do
response.put_header_line (h)
end
note
copyright: "2011-2014, 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