mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-19 11:19:36 +00:00
Report a response body over the limit as ExceedMaxPayloadSize
A buffered request whose response body went over set_payload_max_length(), also once decompressed, failed with Error::Read, while the Stream API reports the same limit as Error::ExceedMaxPayloadSize. read_content() already marks it with a 413 status, so map that status to ExceedMaxPayloadSize next to the 415 and 500 the client maps already.
This commit is contained in:
1 parent
344aceb446
commit
d99c697be6
5 files changed
+43
-2
No files matched your search
@@ -30,6 +30,7 @@ if (res) {
|
||||
| `Error::Connection` | サーバーに接続できなかった。または、使えないURL(authorityにuserinfoやバックスラッシュがある、ポートが不正など)から`Client`を作った。後者の場合は`cli.is_valid()`が`false`になる |
|
||||
| `Error::ConnectionTimeout` | 接続タイムアウト(`set_connection_timeout`) |
|
||||
| `Error::Read` / `Error::Write` | 送受信中のエラー。`set_read_timeout`や`set_max_timeout`によるタイムアウトも`Error::Read`になる |
|
||||
| `Error::ExceedMaxPayloadSize` | レスポンスボディが`set_payload_max_length()`の上限を超えた(解凍後に超えた場合も含む) |
|
||||
| `Error::Timeout` | `stream::Get()`や`SSEClient`で、ボディの読み取りがタイムアウトした |
|
||||
| `Error::ExceedRedirectCount` | リダイレクト回数が上限を超えた |
|
||||
| `Error::SSLConnection` | TLSハンドシェイクに失敗 |
|
||||
|
||||
Reference in new issue
Block a user