| 语言 | 格式 | 评分 |
|---|---|---|
英语 | .pdf | 3 |
| 摘要 | ||
The document details the updates and improvements in various versions of the Waitress server. It highlights bug fixes, compatibility changes, new features, and security enhancements. For instance, version 3.0.1 addresses issues related to busy looping and header handling. Version 3.0.0 introduces IPv6 support and multi-socket listening. Additionally, the document notes changes in how HTTP headers are processed and security measures to prevent potential vulnerabilities. | ||
| AI总结 | ||
### waitress Documentation v3.0.1 总结
#### 1. 版本更新
- **v3.0.1 (未发布)**:
- 修复了可能导致 `select()` 无限循环的 bug,特别是在创建新的 `HTTPChannel` 时。
- 不再 stripping header values,避免影响 `PATH_INFO` 的处理。
- **v3.0.0 (2024-02-04)**:
- 修复了多个 bug,包括在特定 HTTP 状态码(1xx, 204, 304)下不再发送 `Transfer-Encoding` 或 `Content-Length`,并忽略 WSGI 应用发送的消息正文。
- 改进文档结构,引入了 `paste.translogger` 的文档并重新整理。
#### 2. 兼容性改进
- 将 `asyncore` 内置于 `waitress` 中(`waitress.wasyncore`),以应对 Python 标准库未来移除 `asyncore` 的情况。
#### 3. 安全性改进
- 过滤包含下划线的 HTTP 头,以防止潜在的安全问题。
#### 4. 新功能
- **IPv6 支持**:
- 支持通过多个套接字(包括 IPv4 和 IPv6)监听。
- 使用 `listen` 参数指定多个地址和端口,例如:`listen='0.0.0.0:8080 [::]:9090 *:6543'`。
- **命令行工具**:
- 新增 `waitress-serve` 命令行工具,类似于 `waitress.serve`,但使用 hyphen 格式的参数。
#### 5. 错误修复
- **Bugfixes**:
- 修复了非 ASCII 字节请求处理问题,不再直接关闭连接,而是返回 400 错误。
- 修复了 `HTTPChannel` 创建时的 race condition 问题。
- 修复了文件头处理问题,避免 `PATH_INFO` 被错误处理。
#### 6. 弃用
- **Python 2.6** 不再支持。
#### 7. 其他改进
- 支持 `wsgi.file_wrapper`,允许通过 WSGI 应用直接返回文件内容。
- 默认 `send_bytes` 调整为 1,未来将被移除。
- 新增 `outbuf_high_watermark` 调整,用于对 `app_iter` 施加后压,避免数据过载。
#### 8. 使用示例
- **基本使用**:
```python
from waitress import serve
serve(wsgiapp, listen='*:8080') # 监听所有 IPv4 和 IPv6 地址的 8080 端口
serve(wsgiapp, host='0.0.0.0', port=8080) # 只监听 IPv4
serve(wsgiapp) # 默认绑定到 IPv4:8080
serve(wsgiapp, unix_socket='/path/to/unix.sock') # UNIX � domain socket
```
- **命令行工具**:
```bash
waitress-serve --port=8080 --host=127.0.0.1 myapp:myapp_func
```
总结:**waitress v3.0.1** 提供了多项改进和新功能,包括 IPv6 支持、多套接字监听、命令行工具、安全性增强以及文档优化,同时修复了多个 bug 并移除对 Python 2.6 的支持。 | ||
P1
P2
P3
P4
P5
P6
P7
P8
P9
P10
P11
P12
下载文档到本地,方便使用
- 可预览页数已用完,剩余
107 页请下载阅读 -
文档评分














waitress Documentation v3.0.1
waitress Documentation v2.1.1