# h11._util.LocalProtocolError: Illegal header value b'\n'

- **ID:** `python/uvicorn-h11-local-protocol-error`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Response header contains a newline or invalid character, often from user input echoed into a header via Response(headers=...).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.100+ | active | — | — |
| 0.110+ | active | — | — |

## Workarounds

1. **** (92% success)
   ```
   value = value.replace('\r', '').replace('\n', '')  # sanitize before setting header
   ```
2. **** (88% success)
   ```
   Use JSONResponse(body=...) for untrusted data instead of headers.
   ```

## Dead Ends

- **** — Embedded \n still present. (70% fail)
- **** — Same ASGI protocol violation under the hood. (75% fail)
