mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
|
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
DockerPy / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled
## 问题 `onHttpRequest_OPTIONS()` 返回的三个 HTTP 响应头均未包含 `DELETE`(及 `PUT`)方法,而 `onRecvHeader()` 中已明确注册了这两个方法(注释说明用于 WHIP/WHEP)。 这导致浏览器发起跨域 `DELETE` 请求(WHIP session teardown)前的 CORS 预检失败,无法完成 WHIP session 的正常关闭。 关联 issue: #4726 ## 修改内容 在 `src/Http/HttpSession.cpp` 的 `onHttpRequest_OPTIONS()` 中: | 响应头 | 修改前 | 修改后 | |---|---|---| | `Allow` | `GET, POST, HEAD, OPTIONS` | `GET, POST, PUT, HEAD, OPTIONS, DELETE` | | `Access-Control-Allow-Methods` | `GET, POST, HEAD, OPTIONS` | `GET, POST, PUT, HEAD, OPTIONS, DELETE` | | `Access-Control-Request-Methods` | `GET, POST, OPTIONS` | `GET, POST, PUT, OPTIONS, DELETE` | ## 测试 使用支持 WHIP 协议的浏览器客户端,在 `allow_cross_domains=1` 配置下,跨域 `DELETE` 请求可通过 CORS 预检,WHIP session 正常 teardown。 |
||
|---|---|---|
| .. | ||
| Codec | ||
| Common | ||
| Extension | ||
| FMP4 | ||
| Http | ||
| Onvif | ||
| Player | ||
| Pusher | ||
| Record | ||
| Rtcp | ||
| Rtmp | ||
| Rtp | ||
| Rtsp | ||
| Shell | ||
| TS | ||
| CMakeLists.txt | ||