[http] deprecate `request-options` `first-byte-timeout`

未关闭
#962 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@lann 已经在做这个了。

开始于 2026年10月8日。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust, typescript, wasm
领域
api, networking

调研方向

从 proposals/http/wit/types.wit 中的请求选项定义开始,然后对比 crates/wasi-http/src/default_send_request.rs 和 packages/preview2-shim/src/browser/http.ts 中引用的行为。确认预期的兼容性措辞,并更新规范,以便一致地记录弃用和可接受的超时行为。

由索引模型根据 Issue 内容生成。

描述

P-http proposal

I think we should deprecate first-byte-timeout:

  • For many HTTP clients (including fetch), the first (non-error) event observable after dispatching a request is the end of response headers (e.g. \r\n\r\n for HTTP/1.1). The first-byte-timeout instead wants to wait for one more byte: "the first byte of the Response body". I'm not familiar with any reason to treat that byte as special.

  • End of response headers already has an event: the async return of response. If someone wants a timeout there they can use a regular timer that races the response.

  • The timeout between end of response headers and the first byte of the response body can instead be covered by between-bytes-timeout. This would technically be a breaking change but I believe wasmtime-wasi-http and jco already behave this way, so I suggest that we just document that both the original spec behavior and the current implementations' behaviors are acceptable.

主要语言
Rust
星标
5.8k
派生
339
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

WebAssembly/WASI 的其他 Issue

查看 WebAssembly/WASI 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。