# upstream sent HTTP/1.1 response while reading response header from upstream

- **ID:** `nginx/upstream-sent-http-1-1-response-while-reading-response-header`
- **Domain:** nginx
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Upstream server returns HTTP/1.1 response but Nginx is configured to expect HTTP/1.0, causing header parsing mismatch.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| nginx 1.20.x | active | — | — |
| nginx 1.22.x | active | — | — |
| nginx 1.24.x | active | — | — |
| Apache 2.4.x | active | — | — |
| Gunicorn 20.x | active | — | — |

## Workarounds

1. **Set proxy_http_version to 1.1 in the location block: proxy_http_version 1.1;** (85% success)
   ```
   Set proxy_http_version to 1.1 in the location block: proxy_http_version 1.1;
   ```
2. **Configure upstream to return HTTP/1.0 responses if possible.** (70% success)
   ```
   Configure upstream to return HTTP/1.0 responses if possible.
   ```

## Dead Ends

- **Disabling HTTP/1.1 support on upstream** — Upstream servers often default to HTTP/1.1; disabling may break functionality. (60% fail)
- **Increasing proxy buffer sizes** — Buffer size does not affect protocol version negotiation. (80% fail)
- **Adding proxy_set_header Host $host** — Header manipulation doesn't change protocol version. (90% fail)
