@@ -96,7 +96,7 @@ sessions:
9696 - [ X-Response-Identifier, { value : Empty-Accept-Encoding, as: equal } ]
9797 - [ X-Cache, { value : miss, as: equal } ]
9898
99- # Accept-Encoding header deflate would match the alternate of empty Accept-Encoding header
99+ # request deflate Accept-Encoding when origin lacks that variant
100100 - client-request :
101101 method : " GET"
102102 version : " 1.1"
@@ -113,13 +113,12 @@ sessions:
113113 << : *404_response
114114
115115 proxy-response :
116- status : 200
116+ status : 404
117117 headers :
118118 fields :
119- - [ X-Response-Identifier, { value : Empty-Accept-Encoding, as: equal } ]
120- - [ X-Cache, { value : hit-fresh, as: equal } ]
119+ - [ X-Cache, { value : miss, as: equal } ]
121120
122- # Accept-Encoding header br, compress would match the alternate of empty Accept-Encoding header
121+ # load an alternate of br Accept-Encoding header
123122 - client-request :
124123 method : " GET"
125124 version : " 1.1"
@@ -133,14 +132,23 @@ sessions:
133132 delay : 100ms
134133
135134 server-response :
136- << : *404_response
135+ status : 200
136+ reason : OK
137+ headers :
138+ fields :
139+ - [ Transfer-Encoding, chunked ]
140+ - [ Cache-Control, max-age=300 ]
141+ - [ Content-Encoding, br ]
142+ - [ Vary, Accept-Encoding ]
143+ - [ Connection, close ]
144+ - [ X-Response-Identifier, Br-Accept-Encoding ]
137145
138146 proxy-response :
139147 status : 200
140148 headers :
141149 fields :
142- - [ X-Response-Identifier, { value : Empty -Accept-Encoding, as: equal } ]
143- - [ X-Cache, { value : hit-fresh , as: equal } ]
150+ - [ X-Response-Identifier, { value : Br -Accept-Encoding, as: equal } ]
151+ - [ X-Cache, { value : miss , as: equal } ]
144152
145153 # load an alternate of gzip Accept-Encoding header
146154 - client-request :
@@ -176,7 +184,7 @@ sessions:
176184 - [ X-Response-Identifier, { value : Gzip-Accept-Encoding, as: equal } ]
177185 - [ X-Cache, { value : miss, as: equal } ]
178186
179- # Accept-Encoding header br, compress, gzip would match the alternate of gzip Accept-Encoding header
187+ # load an alternate of br Accept-Encoding header
180188 - client-request :
181189 method : " GET"
182190 version : " 1.1"
@@ -190,14 +198,23 @@ sessions:
190198 delay : 100ms
191199
192200 server-response :
193- << : *404_response
201+ status : 200
202+ reason : OK
203+ headers :
204+ fields :
205+ - [ Transfer-Encoding, chunked ]
206+ - [ Cache-Control, max-age=300 ]
207+ - [ Content-Encoding, br ]
208+ - [ Vary, Accept-Encoding ]
209+ - [ Connection, close ]
210+ - [ X-Response-Identifier, Br-Accept-Encoding ]
194211
195212 proxy-response :
196213 status : 200
197214 headers :
198215 fields :
199- - [ X-Response-Identifier, { value : Gzip -Accept-Encoding, as: equal } ]
200- - [ X-Cache, { value : hit-fresh , as: equal } ]
216+ - [ X-Response-Identifier, { value : Br -Accept-Encoding, as: equal } ]
217+ - [ X-Cache, { value : miss , as: equal } ]
201218
202219
203220 # Case 2 proxy.config.http.normalize_ae:1
@@ -699,10 +716,6 @@ sessions:
699716 - [ X-Response-Identifier, { value : Gzip-Accept-Encoding, as: equal } ]
700717 - [ X-Cache, { value : miss, as: equal } ]
701718
702- # NOTICE: This case should load an alternate of br, gzip Accept-Encoding header.
703- # However, due to the implementation of calculate_quality_of_match(),
704- # ATS matches the alternate of gzip Accept-Encoding header.
705- # The result is DIFFERENT from the description of proxy.config.http.normalize_ae: 3
706719 - client-request :
707720 method : " GET"
708721 version : " 1.1"
@@ -733,10 +746,8 @@ sessions:
733746 status : 200
734747 headers :
735748 fields :
736- # - [ X-Response-Identifier, { value: Br-Gzip-Accept-Encoding, as: equal } ]
737- # - [ X-Cache, { value: miss, as: equal } ]
738- - [ X-Response-Identifier, { value : Gzip-Accept-Encoding, as: equal } ]
739- - [ X-Cache, { value : hit-fresh, as: equal } ]
749+ - [ X-Response-Identifier, { value : Br-Gzip-Accept-Encoding, as: equal } ]
750+ - [ X-Cache, { value : miss, as: equal } ]
740751
741752 # Accept-Encoding header compress, gzip would match the alternate of gzip Accept-Encoding header
742753 - client-request :
@@ -784,11 +795,6 @@ sessions:
784795 - [ X-Response-Identifier, { value : Br-Accept-Encoding, as: equal } ]
785796 - [ X-Cache, { value : hit-fresh, as: equal } ]
786797
787- # NOTICE: This case should make Accept-Encoding header br, gzip;q=0.8 match
788- # the alternate of br, gzip Accept-Encoding header.
789- # However, due to the implementation of calculate_quality_of_match(),
790- # ATS matches the alternate of gzip Accept-Encoding header.
791- # The result is DIFFERENT from the description of proxy.config.http.normalize_ae: 3
792798 - client-request :
793799 method : " GET"
794800 version : " 1.1"
@@ -808,6 +814,5 @@ sessions:
808814 status : 200
809815 headers :
810816 fields :
811- # - [ X-Response-Identifier, { value: Br-Gzip-Accept-Encoding, as: equal } ]
812- - [ X-Response-Identifier, { value : Gzip-Accept-Encoding, as: equal } ]
817+ - [ X-Response-Identifier, { value : Br-Gzip-Accept-Encoding, as: equal } ]
813818 - [ X-Cache, { value : hit-fresh, as: equal } ]
0 commit comments