Plainnotes

An odd one-second stall from Expect: 100-continue

2025-06-04 · 2 min readNetwork

An upload endpoint occasionally takes an extra second. A capture shows the client sending headers, pausing, then sending the body a second later: Expect: 100-continue.

HTTP/1.1 lets a client ask whether the server will accept a large body before sending it. Many proxies and frameworks never send 100 Continue, so the client waits for its timeout — often one second — and sends anyway.

Fixes: on the client, skip the header below a size threshold (curl: -H 'Expect:'). On the server, nginx forwards Expect upstream by default; proxy_set_header Expect ""; lets the application read the body directly. In frameworks, check whether the container implements the continue handshake at all.

A capture settles it: either 100 Continue appears or it does not.