Fixed error with identity encoding.
This commit is contained in:
@@ -193,11 +193,11 @@ feature {NONE} -- Implementation
|
||||
loop
|
||||
range := a_parsed_charsets.item_for_iteration
|
||||
if attached range.value as l_range_common then
|
||||
if
|
||||
l_target_field.same_string (l_range_common)
|
||||
or l_target_field.same_string ("*")
|
||||
or l_range_common.same_string ("*")
|
||||
or l_range_common.same_string ("identity")
|
||||
if
|
||||
l_target_field.same_string (l_range_common)
|
||||
or l_target_field.same_string ("*")
|
||||
or l_range_common.same_string ("*")
|
||||
or l_target_field.same_string ("identity")
|
||||
then
|
||||
if l_range_common.same_string (l_target_field) then
|
||||
l_fitness := 100
|
||||
@@ -231,7 +231,7 @@ feature {NONE} -- Implementation
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Javier Velilla, Jocelyn Fiat, Eiffel Software and others"
|
||||
copyright: "2011-2014, Javier Velilla, Jocelyn Fiat, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
|
||||
end
|
||||
|
||||
@@ -141,10 +141,10 @@ feature -- Test routines
|
||||
compression_supported := l_compression.split(',')
|
||||
conneg.set_default_encoding ("gzip")
|
||||
compression_variants := conneg.encoding_preference (compression_supported, "gzip;q=0.7")
|
||||
assert ("Expected Not Acceptable", not compression_variants.is_acceptable)
|
||||
assert ("Expected Acceptable", compression_variants.is_acceptable)
|
||||
assert ("Variants is set",compression_variants.supported_variants = compression_supported)
|
||||
assert ("Variant Header", attached compression_variants.vary_header_value as l_variant_header and then l_variant_header.same_string ("Accept-Encoding"))
|
||||
assert ("Encoding Type is Void", compression_variants.encoding = Void)
|
||||
assert ("Encoding Type is Identity", attached compression_variants.encoding as l_type and then l_type.same_string ("identity"))
|
||||
|
||||
-- Scenario 5, the server set `identity' and the client mention identity,q=0
|
||||
l_compression := "identity"
|
||||
|
||||
Reference in New Issue
Block a user