Attachment downloads ignore request URL and header overrides
评估
调研方向
Start by reading Client.attachments.download(...), download_bytes(...), and _execute_download_request, then check the _build_request argument order. Use the mocked requests.request boundary to verify both public methods honor the API URI and header overrides, omit the bodyless GET Content-type header, and report the overridden URL on timeout.
由索引模型根据 Issue 内容生成。
描述
Both Client.attachments.download(..., overrides=...) and download_bytes(...) pass their options through _execute_download_request, which currently calls _build_request("GET", path, headers, query_params, overrides) positionally. The fifth argument is request_body, not overrides.
For example, a call with overrides={"api_uri": "https://override.example.test", "headers": {"X-Test": "custom"}} still uses the original API URL and omits the custom header. Any nonempty overrides also cause a JSON Content-type header on the bodyless download GET. Timeout selection itself works, but a timeout error reports the original URL when the caller supplied a different API URI.
Reproduced using both public attachment download methods, the real HTTP client, and a mocked requests.request boundary. No live API or account calls. Fourteen regression/control cases:12 fail and2 pass on main. I have a focused keyword-argument fix and tests ready.
- 主要语言
- Python
- 星标
- 109
- 派生
- 85
- 平均合并
- 8 小时 41 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nylas/nylas-python 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 48/100
nylas/nylas-python#455 ·
-
Bug: drafts.create() fails with TypeError for multipart requests (attachments > 3MB)可能已有人在做 @benjaminwhtan 于 266 天前认领。 未关闭
nylas/nylas-python#454 · 3 条评论 · 已指派 1 人 ·
-
UnicodeEncodeError when sending e-mails with some iso-8859 characters (€ symbol)可能重新可做 @pengfeiye 于 277 天前认领,目前没有进行中的 PR。 未关闭bug
nylas/nylas-python#448 · 1 条评论 · 已指派 2 人 ·
-
Create an async version of the client可能重新可做 @AaronDDM 于 495 天前认领,目前没有进行中的 PR。 未关闭enhancement
nylas/nylas-python#412 · 1 条评论 · 5 个 reaction · 已指派 1 人 ·
-
bug
难度 3/5 1-2 天 新手友好度 38/100
nylas/nylas-python#402 · 1 个 reaction ·
查看 nylas/nylas-python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
mohitmishra786/readprism#322 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
API-key credentials accept a blank key: empty via the API, spaces-only via the builder's Add API key dialog可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
Significant-Gravitas/AutoGPT#15727 ·
维护者通常 1 天内回复