Special handling of Expect: 100-Continue may not be appropriate in a proxy
- Dominant language
- Scala
- Stars
- 1.4k
- Forks
- 584
- Avg merge
- 14h 33m
- Merged PRs (30d)
- 24
Description
I'm using Akka HTTP (3.0.0-RC1) to create a reverse-http-proxy. The special handling of `Expect: 100-Continue` looks like it's causing weirdness in this case. In wireshark, here's what I see:
```
Proxy -> RSP: 100 Continue -> Client
Client -> REQ -> Proxy
Server -> RSP: 100 Continue -> Proxy
Proxy -> REQ -> Server
Server -> 200 -> Proxy
Proxy -> 200 -> Client
```
In the production logs (not in an attempt at a clean room reproduction) we see a number of these messages:
```
Sending an 2xx 'early' response before end of request was received...
```
It's not 100% clear that these are related to the special handling of 100, but they do seem to coincide a lot.
It _feels_ like the special handling should be avoided when `akka-http` is operating as a proxy, leaving the handling logic up to the server to which we're proxying.
Contributor guide
Research direction
No files or tests are named. Start by reproducing the reverse-proxy request sequence and inspect the Expect: 100-Continue handling and the early-response logs; compare proxy behavior with direct server handling. Done means the proxy's expected 100-Continue behavior is established and the duplicate or inappropriate responses are addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100