Skip to content

Commit e967563

Browse files
committed
Cleaning up and testing more scenarios for upload proxy behavior.
This test suite seems to reveal Traffic Server 9.1 behaving in an unexpected way, when requests are canceled before the request body has been fully sent, but just trying to test and document current behavior before further upgrades.
1 parent f456904 commit e967563

File tree

4 files changed

+284
-120
lines changed

4 files changed

+284
-120
lines changed

templates/etc/test-env/nginx/apis.conf.etlua

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ server {
172172

173173
local digest = sha256:final()
174174

175+
ngx.status = ngx.var.http_x_expected_status or 200
175176
ngx.header["Content-Type"] = "application/json"
176177
ngx.print(cjson.encode({
177178
method = ngx.var.request_method,
@@ -204,6 +205,7 @@ server {
204205
sha256:update(data)
205206
local digest = sha256:final()
206207

208+
ngx.status = ngx.var.http_x_expected_status or 200
207209
ngx.header["Content-Type"] = "application/json"
208210
local response = cjson.encode({
209211
method = ngx.var.request_method,
@@ -215,7 +217,24 @@ server {
215217
}
216218
}
217219

218-
location = /unread-body {
220+
location = /unread-body-200 {
221+
default_type application/json;
222+
return 200 "{\"method\":\"$request_method\",\"http_content_length\":\"$http_content_length\"}";
223+
}
224+
225+
location = /unread-body-422 {
226+
default_type application/json;
227+
return 422 "{\"method\":\"$request_method\",\"http_content_length\":\"$http_content_length\"}";
228+
}
229+
230+
location = /unread-body-500 {
231+
default_type application/json;
232+
return 500 "{\"method\":\"$request_method\",\"http_content_length\":\"$http_content_length\"}";
233+
}
234+
235+
location = /max-body-size {
236+
client_max_body_size 1m;
237+
client_body_buffer_size 1m;
219238
return 200 "{\"method\":\"$request_method\",\"http_content_length\":\"$http_content_length\"}";
220239
}
221240

0 commit comments

Comments
 (0)