1919
2020sessions :
2121- transactions :
22- # Original GET transactions from escalate_original.replay.yaml
22+ # Non-escalated GET request.
2323 - client-request :
2424 method : " GET"
2525 version : " 1.1"
@@ -51,6 +51,7 @@ sessions:
5151 fields :
5252 - [ X-Response, { value : first, as: equal } ]
5353
54+ # Non-escalated GET request with a chunked response.
5455 - client-request :
5556 method : " GET"
5657 version : " 1.1"
@@ -84,6 +85,7 @@ sessions:
8485 fields :
8586 - [ X-Response, { value : second, as: equal } ]
8687
88+ # GET request that will fail and be escalated
8789 - client-request :
8890 method : " GET"
8991 version : " 1.1"
@@ -107,13 +109,16 @@ sessions:
107109 headers :
108110 fields :
109111 - [ Content-Length, 0 ]
112+ - [ X-Response, third ]
110113
114+ # With escalation, the failover responds with 200
111115 proxy-response :
112- # The failover server should reply with a 200 OK (GET requests are escalated with --escalate-non-get-methods).
113116 status : 200
114117 headers :
115118 fields :
116119 - [ X-Response, { value : third, as: equal } ]
120+ content :
121+ size : 320000
117122
118123 # This will not make it to the origin server since the Host is set to a
119124 # non-responsive server. But the failover server should reply with a 200 OK.
@@ -134,6 +139,7 @@ sessions:
134139 fields :
135140 - [ X-Request, { value : fourth, as: equal } ]
136141
142+ # This server-response is just for replay file validity - origin server won't receive this transaction
137143 server-response :
138144 status : 200
139145 reason : OK
@@ -147,34 +153,32 @@ sessions:
147153 fields :
148154 - [ X-Response, { value : fourth, as: equal } ]
149155
150- # POST request with sizable body that gets proxied normally.
156+ # POST request that succeeds without escalation
151157 - client-request :
152158 method : " POST"
153159 version : " 1.1"
154- url : /api/upload/data
160+ url : /api/post/success
155161 headers :
156162 fields :
157163 - [ Host, origin.server.com ]
158164 - [ Content-Type, "application/json" ]
159- - [ Content-Length, 32 ]
165+ - [ Content-Length, 320000 ]
160166 - [ X-Request, post_success ]
161167 - [ uuid, POST_success ]
162- content :
163- encoding : plain
164- size : 32
165168
166169 proxy-request :
167170 method : " POST"
168171 headers :
169172 fields :
170173 - [ X-Request, { value : post_success, as: equal } ]
174+ - [ Content-Length, { value : 320000, as: equal } ]
171175
172176 server-response :
173177 status : 200
174178 reason : OK
175179 headers :
176180 fields :
177- - [ Content-Length, 32 ]
181+ - [ Content-Length, 0 ]
178182 - [ X-Response, post_success ]
179183
180184 proxy-response :
@@ -183,30 +187,66 @@ sessions:
183187 fields :
184188 - [ X-Response, { value : post_success, as: equal } ]
185189
186- # A HEAD request that will be escalated with --escalate-non-get-methods
190+ # POST request with body that will be escalated with --escalate-non-get-methods
191+ - client-request :
192+ method : " POST"
193+ version : " 1.1"
194+ url : /api/post/data
195+ headers :
196+ fields :
197+ - [ Host, origin.server.com ]
198+ - [ Content-Type, "application/json" ]
199+ - [ Content-Length, 320000 ]
200+ - [ X-Request, post_fail_escalated ]
201+ - [ uuid, POST_fail_escalated ]
202+
203+ proxy-request :
204+ method : " POST"
205+ headers :
206+ fields :
207+ - [ X-Request, { value : post_fail_escalated, as: equal } ]
208+ - [ Content-Length, { value : 320000, as: equal } ]
209+
210+ server-response :
211+ status : 502
212+ reason : Bad Gateway
213+ headers :
214+ fields :
215+ - [ Content-Length, 0 ]
216+ - [ X-Response, post_fail_escalated ]
217+
218+ # With --escalate-non-get-methods, POST request is escalated to failover.
219+ proxy-response :
220+ status : 200
221+ headers :
222+ fields :
223+ - [ X-Response, { value : post_fail_escalated, as: equal } ]
224+
225+ # HEAD request that will be escalated with --escalate-non-get-methods
187226 - client-request :
188227 method : " HEAD"
189228 version : " 1.1"
190- url : /api/head/data
229+ url : /path/head_fail
191230 headers :
192231 fields :
193232 - [ Host, origin.server.com ]
194- - [ X-Request, head_fail_escalated ]
233+ - [ Content-Length, 0 ]
234+ - [ X-Request, head_fail ]
195235 - [ uuid, HEAD_fail_escalated ]
196236
197237 proxy-request :
198238 method : " HEAD"
199239 headers :
200240 fields :
201- - [ X-Request, { value : head_fail_escalated , as: equal } ]
241+ - [ X-Request, { value : head_fail , as: equal } ]
202242
203243 server-response :
204244 status : 502
205245 reason : Bad Gateway
206246 headers :
207247 fields :
208248 - [ Content-Length, 0 ]
209- - [ X-Response, head_fail_escalated ]
249+ - [ X-Response, head_fail ]
210250
211251 # With --escalate-non-get-methods, HEAD request is escalated to failover.
212252 proxy-response :
0 commit comments