@@ -233,6 +233,7 @@ typedef struct ngx_http_upload_ctx_s {
233
233
ngx_chain_t * chain ;
234
234
ngx_chain_t * last ;
235
235
ngx_chain_t * checkpoint ;
236
+ ngx_chain_t * to_write ;
236
237
size_t output_body_len ;
237
238
size_t limit_rate ;
238
239
ssize_t received ;
@@ -2975,7 +2976,7 @@ ngx_http_read_upload_client_request_body(ngx_http_request_t *r) {
2975
2976
2976
2977
/* the whole request body may be placed in r->header_in */
2977
2978
2978
- rb -> to_write = rb -> bufs ;
2979
+ u -> to_write = rb -> bufs ;
2979
2980
2980
2981
r -> read_event_handler = ngx_http_read_upload_client_request_body_handler ;
2981
2982
@@ -3034,7 +3035,7 @@ ngx_http_read_upload_client_request_body(ngx_http_request_t *r) {
3034
3035
3035
3036
* next = cl ;
3036
3037
3037
- rb -> to_write = rb -> bufs ;
3038
+ u -> to_write = rb -> bufs ;
3038
3039
3039
3040
r -> read_event_handler = ngx_http_read_upload_client_request_body_handler ;
3040
3041
@@ -3116,7 +3117,7 @@ ngx_http_do_read_upload_client_request_body(ngx_http_request_t *r)
3116
3117
for ( ;; ) {
3117
3118
if (rb -> buf -> last == rb -> buf -> end ) {
3118
3119
3119
- rc = ngx_http_process_request_body (r , rb -> to_write );
3120
+ rc = ngx_http_process_request_body (r , u -> to_write );
3120
3121
3121
3122
switch (rc ) {
3122
3123
case NGX_OK :
@@ -3132,7 +3133,7 @@ ngx_http_do_read_upload_client_request_body(ngx_http_request_t *r)
3132
3133
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
3133
3134
}
3134
3135
3135
- rb -> to_write = rb -> bufs -> next ? rb -> bufs -> next : rb -> bufs ;
3136
+ u -> to_write = rb -> bufs -> next ? rb -> bufs -> next : rb -> bufs ;
3136
3137
rb -> buf -> last = rb -> buf -> start ;
3137
3138
}
3138
3139
@@ -3224,7 +3225,7 @@ ngx_http_do_read_upload_client_request_body(ngx_http_request_t *r)
3224
3225
ngx_del_timer (c -> read );
3225
3226
}
3226
3227
3227
- rc = ngx_http_process_request_body (r , rb -> to_write );
3228
+ rc = ngx_http_process_request_body (r , u -> to_write );
3228
3229
3229
3230
switch (rc ) {
3230
3231
case NGX_OK :
0 commit comments