[Bug]: CapacitorHttp: Authorization header not forwarded on 302 redirect (iOS only)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- ios, swift
- 领域
- mobile-dev, networking
调研方向
从链接的 capacitor-http-troubleshoot 复现开始,比较 CapacitorHttp 在 iOS、Android 和 web 上处理 POST 请求时的行为。调查 CapacitorHttp 在 iOS 上的重定向处理;完成标准是 302 重定向后的请求仍保留 Authorization 标头,同时不导致其他平台出现回归问题。
由索引模型根据 Issue 内容生成。
描述
Capacitor Version
Latest Dependencies:
@capacitor/cli: 7.4.3
@capacitor/core: 7.4.3
@capacitor/android: 7.4.3
@capacitor/ios: 7.4.3
Installed Dependencies:
@capacitor/cli: 7.4.3
@capacitor/ios: 7.4.3
@capacitor/core: 7.4.3
@capacitor/android: 7.4.3
Other API Details
npm --version output: 11.4.2
node --version output: v24.3.0
pod --version output: 1.16.2
Platforms Affected
- iOS
- Android
- Web
Current Behavior
When using the CapacitorHttp plugin, Authorization header is not included in the redirected request on iOS. On Android, and when running as a web app on iOS/mac, the header is forwarded as expected. It also works when CapacitorHttp is disabled. This issue appears to affect only POST requests with 302 redirects.
Expected Behavior
Authorization header from the POST request should be included in the redirect request.
Project Reproduction
https://github.com/ruifang/capacitor-http-troubleshoot
Additional Information
Http request used in example:
POST /redirect-to?url=headers HTTP/1.1
Host: httpbingo.org
Authorization: Bearer 1234
X-Custom-Header: 123456
iOS:
https://github.com/user-attachments/assets/bf413401-c37b-4005-88d9-dae325103725
Safari:
https://github.com/user-attachments/assets/7b0e57c7-7811-4886-958d-d5314271ea23
Android:
https://github.com/user-attachments/assets/653e63f7-34a8-44fa-b0ba-47a2c3fb224e
- 主要语言
- TypeScript
- 星标
- 17.1k
- 派生
- 1.3k
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 26
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ionic-team/capacitor 的其他 Issue
-
triage
难度 2/5 1-3 小时 新手友好度 76/100
ionic-team/capacitor#8759 ·
维护者通常 1 天内回复
-
[Bug]: Plugin call after navigation can be answered before reply proxy is updated可能已有人在做 @MateStrysewske 于 71 天前认领。 未关闭triage
难度 2/5 1-3 小时 新手友好度 84/100
ionic-team/capacitor#8616 ·
维护者通常 1 天内回复
-
help wanted
难度 2/5 1-3 小时 新手友好度 68/100
ionic-team/capacitor#8574 · 3 条评论 ·
维护者通常 1 天内回复
-
SystemBars: safe area CSS injection throws "Cannot read properties of null" on startup (Android 16)可能已有人在做 @kttalley 于 62 天前认领。 未关闭triage
难度 2/5 1-3 小时 新手友好度 78/100
ionic-team/capacitor#8530 · 2 条评论 ·
维护者通常 1 天内回复
-
fix(android): remove unchecked Java compilation warnings可能已有人在做 @Ajamuar 于 15 天前认领。 未关闭triage
难度 2/5 1-3 小时 新手友好度 78/100
ionic-team/capacitor#8529 · 1 条评论 ·
维护者通常 1 天内回复
查看 ionic-team/capacitor 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
prio:low scope:world
难度 2/5 1-3 小时 新手友好度 83/100
OliverRomhagen/vrigstad-joyride#849 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
genfeedai/genfeed.ai#11916 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
erkamyaman/rust-anything#1153 ·
维护者通常 1 天内回复
-
The Phase 5 report says 0.3.0 waits for the live check可能已有人在做 @fzn0x 今天认领。 未关闭documentation
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复