| 名称 | 414 URI Too Long |
|---|---|
| 作用 | URI 超出服务器限制 |
| 规范 | RFC 9110 §15.5.15 |
| 常见限制 | Nginx large_client_header_buffers;浏览器地址栏约 2000-8000 字符 |
改用 POST 或分批查询
改用 POST 或分批查询
# 反例:几百个 id 拼在 URL
curl -s 'https://api.example.com/items?ids=1,2,3,...(上千个)'
# 正例:POST 查询接口
curl -s -X POST https://api.example.com/items/batch-query -d '{"ids":[…] }'排查时注意区分:414(URI 本身太长)、431(头字段太大)、400(URI 含非法字符)。