mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-26 13:31:30 +00:00
Treat 0 as no limit for the remaining limits
set_keep_alive_max_count(0) tripped an assert, a negative WebSocket ping interval sent pings in a tight loop, and the form length, multipart file count and range count macros rejected every request at 0. Make 0 mean no limit for those, and a ping interval of 0 or less turn pings off. The URI, header and line bounds cannot be lifted, so a static_assert keeps them positive.
This commit is contained in:
@@ -10,7 +10,7 @@ status: "draft"
|
||||
|
||||
| API | Default | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `set_keep_alive_max_count` | 100 | Max requests served over a single connection |
|
||||
| `set_keep_alive_max_count` | 100 | Max requests served over a single connection (0 for no limit) |
|
||||
| `set_keep_alive_timeout` | 5s | How long an idle connection is kept before closing |
|
||||
|
||||
## Basic usage
|
||||
|
||||
@@ -10,7 +10,7 @@ status: "draft"
|
||||
|
||||
| API | デフォルト | 意味 |
|
||||
| --- | --- | --- |
|
||||
| `set_keep_alive_max_count` | 100 | 1本の接続で受け付けるリクエストの最大数 |
|
||||
| `set_keep_alive_max_count` | 100 | 1本の接続で受け付けるリクエストの最大数(0 で無制限) |
|
||||
| `set_keep_alive_timeout` | 5秒 | アイドル状態の接続を閉じるまでの秒数 |
|
||||
|
||||
## 基本の使い方
|
||||
|
||||
Reference in New Issue
Block a user