If the first response line was split across reads and it didn't appear
a status line, the portion already processed was lost. The change
introduces a new field for proper backtracking on status line fallback.
}
if (rc == NGX_ERROR) {
+ u->buffer.pos = ctx->status.line_start;
#if (NGX_HTTP_CACHE)
if (rc == NGX_ERROR) {
u->process_header = ngx_http_scgi_process_header;
+ u->buffer.pos = status->line_start;
r->state = 0;
return ngx_http_scgi_process_header(r);
}
if (rc == NGX_ERROR) {
u->process_header = ngx_http_uwsgi_process_header;
+ u->buffer.pos = status->line_start;
r->state = 0;
return ngx_http_uwsgi_process_header(r);
}
ngx_uint_t http_version;
ngx_uint_t code;
ngx_uint_t count;
+ u_char *line_start;
u_char *start;
u_char *end;
} ngx_http_status_t;
/* "HTTP/" */
case sw_start:
+ status->line_start = p;
+
switch (ch) {
case 'H':
state = sw_H;