Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

ngx_http_upstream_process_non_buffered_request recv question (2 replies)

$
0
0
size = b->end - b->last;

if (size && upstream->read->ready) {

n = upstream->recv(upstream, b->last, size);

if (n == NGX_AGAIN) {
break;
}

if (n > 0) {
u->state->response_length += n;

if (u->input_filter(u->input_filter_ctx, n) == NGX_ERROR) {
ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
return;
}
}

do_write = 1;

continue;
}

Why not consider n==0 or n==NGX_ERROR as ngx_http_upstream_process_upgraded
How handle it if upstream connection failed?

Viewing all articles
Browse latest Browse all 7229

Trending Articles