diff --git a/library/network/protocol/content_negotiation/src/parsers/http_any_accept_header_utilities.e b/library/network/protocol/content_negotiation/src/parsers/http_any_accept_header_utilities.e index 2551d071..a0cb05d4 100644 --- a/library/network/protocol/content_negotiation/src/parsers/http_any_accept_header_utilities.e +++ b/library/network/protocol/content_negotiation/src/parsers/http_any_accept_header_utilities.e @@ -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 diff --git a/library/network/protocol/content_negotiation/test/conneg_server_side_test.e b/library/network/protocol/content_negotiation/test/conneg_server_side_test.e index 6bf9f7ed..73f4a1f3 100644 --- a/library/network/protocol/content_negotiation/test/conneg_server_side_test.e +++ b/library/network/protocol/content_negotiation/test/conneg_server_side_test.e @@ -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"