diff --git a/library/network/protocol/content_negotiation/src/implementation/fitness_and_quality.e b/library/network/protocol/content_negotiation/src/implementation/fitness_and_quality.e index 0b7ab39f..01b38c1f 100644 --- a/library/network/protocol/content_negotiation/src/implementation/fitness_and_quality.e +++ b/library/network/protocol/content_negotiation/src/implementation/fitness_and_quality.e @@ -1,5 +1,5 @@ note - description: "Summary description for {FITNESS_AND_QUALITY}." + description: "FITNESS_AND_QUALITY. Object holding a fitness/quality values." date: "$Date$" revision: "$Revision$" @@ -20,6 +20,7 @@ create feature -- Initialization make (a_fitness: INTEGER; a_quality: REAL_64) + -- Create an object with `a_fitness' and `a_quality' do fitness := a_fitness quality := a_quality @@ -27,6 +28,7 @@ feature -- Initialization ensure fitness_assigned : fitness = a_fitness quality_assigned : quality = a_quality + entity_empty: entity.is_empty end feature -- Access diff --git a/library/network/protocol/content_negotiation/src/results/http_accept_language.e b/library/network/protocol/content_negotiation/src/results/http_accept_language.e index 9b6b9be9..74729711 100644 --- a/library/network/protocol/content_negotiation/src/results/http_accept_language.e +++ b/library/network/protocol/content_negotiation/src/results/http_accept_language.e @@ -7,6 +7,8 @@ class HTTP_ACCEPT_LANGUAGE inherit + HTTP_HEADER_UTILITIES + REFACTORING_HELPER DEBUG_OUTPUT @@ -222,16 +224,6 @@ feature {NONE} -- Implementation end end -feature {NONE} -- Helper - - trimmed_string (s: READABLE_STRING_8): STRING_8 - -- Copy of `s', where whitespace were stripped from the beginning and end of the string - do - create Result.make_from_string (s) - Result.left_adjust - Result.right_adjust - end - invariant valid_quality: 0.0 <= quality and quality <= 1.0 diff --git a/library/network/protocol/content_negotiation/src/results/http_any_accept.e b/library/network/protocol/content_negotiation/src/results/http_any_accept.e index f35bbb4d..71a41f2e 100644 --- a/library/network/protocol/content_negotiation/src/results/http_any_accept.e +++ b/library/network/protocol/content_negotiation/src/results/http_any_accept.e @@ -7,6 +7,8 @@ class HTTP_ANY_ACCEPT inherit + HTTP_HEADER_UTILITIES + REFACTORING_HELPER DEBUG_OUTPUT @@ -101,16 +103,6 @@ feature -- Status Report create Result.make_from_string (value) end -feature {NONE} -- Helper - - trimmed_string (s: READABLE_STRING_8): STRING_8 - -- Copy of `s', where whitespace were stripped from the beginning and end of the string - do - create Result.make_from_string (s) - Result.left_adjust - Result.right_adjust - end - note copyright: "2011-2013, Javier Velilla, Jocelyn Fiat, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" diff --git a/library/network/protocol/content_negotiation/src/variants/http_accept_charset_variants.e b/library/network/protocol/content_negotiation/src/variants/http_accept_charset_variants.e index 3a36e0a8..13775ebd 100644 --- a/library/network/protocol/content_negotiation/src/variants/http_accept_charset_variants.e +++ b/library/network/protocol/content_negotiation/src/variants/http_accept_charset_variants.e @@ -24,6 +24,7 @@ create feature -- Change set_vary_header_value + -- do vary_header_value := {HTTP_HEADER_NAMES}.header_accept_charset -- "Accept-Charset" end diff --git a/library/network/protocol/content_negotiation/src/variants/http_accept_encoding_variants.e b/library/network/protocol/content_negotiation/src/variants/http_accept_encoding_variants.e index 805bf1a9..d814d5fc 100644 --- a/library/network/protocol/content_negotiation/src/variants/http_accept_encoding_variants.e +++ b/library/network/protocol/content_negotiation/src/variants/http_accept_encoding_variants.e @@ -24,6 +24,7 @@ create feature -- Change set_vary_header_value + -- do vary_header_value := {HTTP_HEADER_NAMES}.header_accept_encoding -- "Accept-Encoding" end diff --git a/library/network/protocol/content_negotiation/src/variants/http_accept_language_variants.e b/library/network/protocol/content_negotiation/src/variants/http_accept_language_variants.e index f51b1f87..78320048 100644 --- a/library/network/protocol/content_negotiation/src/variants/http_accept_language_variants.e +++ b/library/network/protocol/content_negotiation/src/variants/http_accept_language_variants.e @@ -23,6 +23,7 @@ create feature -- Change set_vary_header_value + -- do vary_header_value := {HTTP_HEADER_NAMES}.header_accept_language -- "Accept-Language" end diff --git a/library/network/protocol/content_negotiation/src/variants/http_accept_media_type_variants.e b/library/network/protocol/content_negotiation/src/variants/http_accept_media_type_variants.e index 00900ce3..1f15ce31 100644 --- a/library/network/protocol/content_negotiation/src/variants/http_accept_media_type_variants.e +++ b/library/network/protocol/content_negotiation/src/variants/http_accept_media_type_variants.e @@ -23,6 +23,7 @@ create feature -- Change set_vary_header_value + -- do vary_header_value := {HTTP_HEADER_NAMES}.header_accept -- "Accept" end