diff --git a/bundle/nginx-1.27.1/src/http/modules/ngx_http_proxy_module.c b/bundle/nginx-1.27.1/src/http/modules/ngx_http_proxy_module.c
index c244ceb..e5883f9 100644
--- a/bundle/nginx-1.27.1/src/http/modules/ngx_http_proxy_module.c
+++ b/bundle/nginx-1.27.1/src/http/modules/ngx_http_proxy_module.c
@@ -1837,6 +1837,7 @@ ngx_http_proxy_process_status_line(ngx_http_request_t *r)
     }
 
     if (rc == NGX_ERROR) {
+        u->buffer.pos = ctx->status.line_start;
 
 #if (NGX_HTTP_CACHE)
 
diff --git a/bundle/nginx-1.27.1/src/http/modules/ngx_http_scgi_module.c b/bundle/nginx-1.27.1/src/http/modules/ngx_http_scgi_module.c
index f818fc4..33ff6ca 100644
--- a/bundle/nginx-1.27.1/src/http/modules/ngx_http_scgi_module.c
+++ b/bundle/nginx-1.27.1/src/http/modules/ngx_http_scgi_module.c
@@ -1029,6 +1029,8 @@ ngx_http_scgi_process_status_line(ngx_http_request_t *r)
 
     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);
     }
 
diff --git a/bundle/nginx-1.27.1/src/http/modules/ngx_http_uwsgi_module.c b/bundle/nginx-1.27.1/src/http/modules/ngx_http_uwsgi_module.c
index c965d4b..1c62f84 100644
--- a/bundle/nginx-1.27.1/src/http/modules/ngx_http_uwsgi_module.c
+++ b/bundle/nginx-1.27.1/src/http/modules/ngx_http_uwsgi_module.c
@@ -1257,6 +1257,8 @@ ngx_http_uwsgi_process_status_line(ngx_http_request_t *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);
     }
 
diff --git a/bundle/nginx-1.27.1/src/http/ngx_http.h b/bundle/nginx-1.27.1/src/http/ngx_http.h
index e06464e..a252fad 100644
--- a/bundle/nginx-1.27.1/src/http/ngx_http.h
+++ b/bundle/nginx-1.27.1/src/http/ngx_http.h
@@ -72,6 +72,7 @@ typedef struct {
     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;
diff --git a/bundle/nginx-1.27.1/src/http/ngx_http_parse.c b/bundle/nginx-1.27.1/src/http/ngx_http_parse.c
index f7e5038..6dd2206 100644
--- a/bundle/nginx-1.27.1/src/http/ngx_http_parse.c
+++ b/bundle/nginx-1.27.1/src/http/ngx_http_parse.c
@@ -1648,6 +1648,8 @@ ngx_http_parse_status_line(ngx_http_request_t *r, ngx_buf_t *b,
 
         /* "HTTP/" */
         case sw_start:
+            status->line_start = p;
+
             switch (ch) {
             case 'H':
                 state = sw_H;
