|
18 | 18 | version: "1.0" |
19 | 19 |
|
20 | 20 | autest: |
21 | | - description: 'Test set-body origin replacement without response transforms' |
| 21 | + description: 'Test set-body origin replacement (transform plugin loaded; selected paths keep it inactive)' |
22 | 22 |
|
23 | 23 | dns: |
24 | 24 | name: 'dns' |
@@ -47,31 +47,31 @@ autest: |
47 | 47 | proxy.config.diags.debug.tags: 'http|header_rewrite' |
48 | 48 |
|
49 | 49 | remap_config: |
50 | | - # Block 1: READ_RESPONSE hook replacement path (no transform plugin). |
| 50 | + # Block 1: READ_RESPONSE hook replacement path with transform inactive (non-200 response). |
51 | 51 | - from: "http://www.example.com/set_body_read_resp_403/" |
52 | 52 | to: "http://backend.ex:{SERVER_HTTP_PORT}/origin_read_403/" |
53 | 53 | plugins: |
54 | 54 | - name: "header_rewrite.so" |
55 | 55 | args: |
56 | 56 | - "rules/rule_set_body_origin_read_resp.conf" |
57 | 57 |
|
58 | | - # Block 2: SEND_RESPONSE hook replacement path (no transform plugin). |
| 58 | + # Block 2: SEND_RESPONSE hook replacement path with transform inactive (non-200 response). |
59 | 59 | - from: "http://www.example.com/set_body_send_resp_403/" |
60 | 60 | to: "http://backend.ex:{SERVER_HTTP_PORT}/origin_send_403/" |
61 | 61 | plugins: |
62 | 62 | - name: "header_rewrite.so" |
63 | 63 | args: |
64 | 64 | - "rules/rule_set_body_origin_send_resp.conf" |
65 | 65 |
|
66 | | - # Block 3a: cache-bypass probe for READ_RESPONSE hook (same URL twice). |
| 66 | + # Block 3a: repeated-URL probe for READ_RESPONSE hook (same URL twice, transform inactive). |
67 | 67 | - from: "http://www.example.com/cache_probe_read/" |
68 | 68 | to: "http://backend.ex:{SERVER_HTTP_PORT}/cache_probe_read/" |
69 | 69 | plugins: |
70 | 70 | - name: "header_rewrite.so" |
71 | 71 | args: |
72 | 72 | - "rules/rule_set_body_origin_read_resp.conf" |
73 | 73 |
|
74 | | - # Block 3b: cache-bypass probe for SEND_RESPONSE hook (same URL twice). |
| 74 | + # Block 3b: repeated-URL probe for SEND_RESPONSE hook (same URL twice, transform inactive). |
75 | 75 | - from: "http://www.example.com/cache_probe_send/" |
76 | 76 | to: "http://backend.ex:{SERVER_HTTP_PORT}/cache_probe_send/" |
77 | 77 | plugins: |
@@ -160,7 +160,7 @@ sessions: |
160 | 160 | size: 9 |
161 | 161 | data: "Sanitized" |
162 | 162 |
|
163 | | - # Block 3a verification: cache-bypass probe for READ_RESPONSE. |
| 163 | + # Block 3a verification: repeated-URL probe for READ_RESPONSE. |
164 | 164 | # First response on repeated URL. |
165 | 165 | - client-request: |
166 | 166 | method: "GET" |
@@ -191,7 +191,7 @@ sessions: |
191 | 191 | size: 9 |
192 | 192 | data: "Sanitized" |
193 | 193 |
|
194 | | - # Block 3a verification: cache-bypass probe for READ_RESPONSE. |
| 194 | + # Block 3a verification: repeated-URL probe for READ_RESPONSE. |
195 | 195 | # Second response on repeated URL should still be replaced. |
196 | 196 | # Keep this as non-200 so null_transform does not engage. |
197 | 197 | - client-request: |
@@ -223,7 +223,7 @@ sessions: |
223 | 223 | size: 9 |
224 | 224 | data: "Sanitized" |
225 | 225 |
|
226 | | - # Block 3b verification: cache-bypass probe for SEND_RESPONSE. |
| 226 | + # Block 3b verification: repeated-URL probe for SEND_RESPONSE. |
227 | 227 | # First response on repeated URL. |
228 | 228 | - client-request: |
229 | 229 | method: "GET" |
@@ -254,7 +254,7 @@ sessions: |
254 | 254 | size: 9 |
255 | 255 | data: "Sanitized" |
256 | 256 |
|
257 | | - # Block 3b verification: cache-bypass probe for SEND_RESPONSE. |
| 257 | + # Block 3b verification: repeated-URL probe for SEND_RESPONSE. |
258 | 258 | # Second response on repeated URL should still be replaced. |
259 | 259 | # Keep this as non-200 so null_transform does not engage. |
260 | 260 | - client-request: |
@@ -312,6 +312,7 @@ sessions: |
312 | 312 | headers: |
313 | 313 | fields: |
314 | 314 | - [ Content-Length, { value: "9", as: equal } ] |
| 315 | + - [ Content-Type, { value: "text/html", as: equal } ] |
315 | 316 | content: |
316 | 317 | size: 9 |
317 | 318 | data: "Sanitized" |
@@ -342,6 +343,7 @@ sessions: |
342 | 343 | headers: |
343 | 344 | fields: |
344 | 345 | - [ Content-Length, { value: "9", as: equal } ] |
| 346 | + - [ Content-Type, { value: "text/html", as: equal } ] |
345 | 347 | content: |
346 | 348 | size: 9 |
347 | 349 | data: "Sanitized" |
0 commit comments