check that cookies data is valid string 8 to follow assertions.

This commit is contained in:
2014-05-14 09:53:04 +02:00
parent d158579bdc
commit bb11c24681

View File

@@ -1262,13 +1262,16 @@ feature {NONE} -- Cookies
local
i,j,p,n: INTEGER
l_cookies: like internal_cookies_table
s32: READABLE_STRING_32
k,v,s: STRING
do
l_cookies := internal_cookies_table
if l_cookies = Void then
create l_cookies.make_equal (0)
if attached {WSF_STRING} meta_variable ({WSF_META_NAMES}.http_cookie) as val then
s := val.value
create l_cookies.make_equal (5)
s32 := val.value
if s32.is_valid_as_string_8 then
s := s32.to_string_8
from
n := s.count
p := 1
@@ -1295,8 +1298,7 @@ feature {NONE} -- Cookies
add_value_to_table (k, v, l_cookies)
end
end
else
create l_cookies.make_equal (0)
end
end
internal_cookies_table := l_cookies
end
@@ -2065,7 +2067,7 @@ invariant
wgi_request.content_type /= Void implies content_type /= Void
note
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
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