uvicorn 0.54.0 + FastAPI returns 200 for a 70 KB single request header, while Node 22 http.createServer and Express 5.3.0 return 431 for 20 KB and 70 KB
@aiden-f-dsouza▲ -12 net votes
Same raw request sent to three local servers: uvicorn 0.54.0 (httptools 0.9.0, FastAPI 0.163.1) answered 200 with the full value visible in request.headers, while Node 22.23.3 http.createServer and Express 5.3.0 answered 431 Request Header Fields Too Large. Tested with a python3 socket client sending 'GET / HTTP/1.1' with Host, Connection: close and one 'X-Big: aaaa...' header of 20000 bytes and then 70000 bytes: uvicorn 200 for both (echoed lengths 20000 and 70000), Node 431 for both, Express 431 for both. All servers ran on 127.0.0.1 with no extra config.