xiongziliang
de040511d2
跨域配置改为支持域名白名单
2026-09-29 11:31:43 +08:00
xiongziliang
5b5de37a17
fix(security): 防止HTTP响应头注入漏洞
2026-09-20 23:13:54 +08:00
YuLi
4a24057e73
feat(http): decouple upload size limit from maxReqSize and harden file upload ( #4780 )
...
- Add maxUploadSize config (default 1GB) for custom HttpBody streaming uploads;
maxReqSize now only controls in-memory buffering threshold
- Reject uploads exceeding maxUploadSize with 413 before writing any data
- Delete incomplete files on HttpFileStorage destruction
- Open HttpFileStorage in "wb" mode instead of "ab" to avoid stale data
- Pass content_size to writeData() for integrity validation
- Use uint64_t for content_len to support large file uploads
- Wrap HttpBody _on_completed callback in try-catch to prevent unhandled exceptions
- Make GET_CONFIG global variables read-only
- Update ZLToolKit submodule
---------
Co-authored-by: xiongziliang <771730766@qq.com >
2026-07-23 13:55:35 +08:00
xiongziliang
92681fe6e1
新增支持http文件上传功能
2026-07-08 11:12:22 +08:00
greenjim301-ux
a85db32223
fix: add DELETE and PUT to OPTIONS allowed methods for WHIP/WHEP CORS preflight ( #4727 )
...
## 问题
`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。
2026-04-30 15:08:37 +08:00
xia-chu
128d2a057c
新增支持HTTP PUT方法
2026-01-09 11:39:41 +08:00
xia-chu
52b55ded97
修复ws-flv/fmp4/ts播放异常的bug ( #4553 )
...
修复提交 "8b5f313284ee876f3627ab4a2eb6460072f12fd1" 引入的bug
2025-11-23 19:26:29 +08:00
xia-chu
8b5f313284
解决websocket-flv/fmp4/ts多路播放请求pending问题 ( #4553 )
...
解决等待流注册或播放鉴权hook回复时,zlm未及时回复http头(升级为websocket), 多个http请求并发导致pending的问题
2025-11-23 12:55:23 +08:00
custompal
f0204ea3b3
播放器(reader)setGetInfoCB时统一使用Session对象 ( #4195 )
...
Co-authored-by: custompal <chenrengen@gosuncn.com >
2025-03-21 15:22:48 +08:00
xiongguangjie
2a85dffdf9
on_play/on_publish hook 新增protocol字段 ( #4133 #4143 )
...
对于webhook 涉及到media info的相关信息,增加protocol 的字段,表明是基于什么协议传输的
2025-02-13 15:18:47 +08:00
alex
4152dcd409
AI automatically translates all comments in the code into English ( #3917 )
2024-09-19 14:53:50 +08:00
xia-chu
e4de454d5d
Charset default to UTF-8 on Windows
2024-04-20 22:25:21 +08:00
xia-chu
e972ec5a22
Remove deprecated code
2024-03-22 20:50:07 +08:00
sandro-qiang
ceae040a7a
Fix http url path and component's coding ( #3237 #3181 )
2024-01-28 19:18:36 +08:00
xiongziliang
cfe9a31ca6
Fix http cross domain issues
2024-01-27 21:29:10 +08:00
xiongguangjie
9d68b668fc
Add http pipelining request support ( #3154 )
...
Support recv multi http request before reponse it.
Co-authored-by: 夏楚 <771730766@qq.com >
2023-12-23 21:27:28 +08:00
夏楚
bbe8f4a018
release 8.0
2023-12-09 16:23:51 +08:00
ljx0305
7ee2d66eaa
统一代码命名风格 ( #2910 )
...
openRtpServer时,如果开启tcp模式,从tcp端口池获取
2023-10-19 17:55:30 +08:00
xia-chu
39dd886ec1
优化获取播放器列表相关功能
2023-09-02 12:07:42 +08:00
xia-chu
d286ac1d73
NoticeCenter支持安全类型转换,解决监听者参数类型不一致导致的bug
2023-09-02 11:22:28 +08:00
xia-chu
ccddb84a19
修复跨域问题: #2548
2023-06-17 09:15:50 +08:00
xiongziliang
fe37005526
兼容http body超过声明大小的情况
2023-06-11 09:22:28 +08:00
夏楚
5f936663b4
统一处理content-length, 修复http get请求带body不兼容问题( #2528 #2544 )
2023-06-10 20:49:21 +08:00
xiongguangjie
67d5c42007
Fix addStreamProxy rtsp url user or pass contain special char result in auth failed ( #2545 )
2023-06-10 18:46:30 +08:00
xia-chu
31944a92ad
重写Parser代码实现
2023-06-10 14:55:40 +08:00
xia-chu
af0ebf4633
优化Parser代码命名
2023-06-10 14:55:40 +08:00
xia-chu
52c7bc1d34
精简HttpServer代码
2023-06-10 14:55:40 +08:00
xia-chu
fff53cf0e2
格式化HttpSession.cpp代码
2023-06-10 14:55:40 +08:00
xiongziliang
af57691bc8
c++14相关代码替换为c++11代码
2023-06-02 21:43:24 +08:00
百鸣
14537bfbc7
解决ws-flv和http-flv的累积时延问题( #2509 )
2023-05-31 23:16:16 +08:00
Johnny
0232caf068
add MediaTuple
2023-05-30 11:01:27 +08:00
老衲不出家
f6ac39ade5
新增允许所有跨域请求配置项 ( #2449 )
...
配置项为http.allow_cross_domains
2023-05-12 11:47:22 +08:00
xia-chu
8c049d4e28
实现whip/whep delete相关功能
...
通过whip/whep 回复http头中的Location url进行删除资源
新增delete token随机数实现删除鉴权
2023-04-28 22:36:58 +08:00
xia-chu
d2349f01bd
使用static_pointer_cast优化性能
2023-04-28 22:04:38 +08:00
xia-chu
cdf97e7605
更新zltoolkit,适配最新代码
2023-04-28 22:04:09 +08:00
xiongziliang
c8a20f85f6
直接打印SockException类
2023-04-23 00:10:18 +08:00
xiongziliang
de8249592e
Session类构造析构跟踪日志统一在底层网络框架打印
2023-04-22 23:58:17 +08:00
老衲不出家
f05a9501fa
Unified code style ( #2137 )
2022-12-02 14:43:06 +08:00
ziyue
68948288e0
TcpSession/UdpSession统一为Session类
2022-11-19 09:33:10 +08:00
夏楚
4a35ddbddb
Merge pull request #1942 from mtdxc/reduce_code
...
简化代码
2022-09-09 11:10:55 +08:00
cqm
999e0b274e
简化代码:
...
- MediaSource引入shortUrl和getUrl来简化日志输出
- WebApi引入fillSockInfo
2022-09-07 11:47:15 +08:00
WuPeng
f765e5365b
修正在指定配置文件forwarded_ip_header的值后,无法获取不通过代理播放的客户端IP。
2022-09-06 21:13:11 +08:00
custompal
0d6509ce03
统一部分变量名和代码样式风格
2022-08-30 21:24:25 +08:00
custompal
04aa3ef41f
增加获取媒体流播放器列表功能
2022-08-30 21:05:19 +08:00
xiongziliang
d30869d0c9
支持获取http反向代理真实客户端ip: #1388
2022-06-18 22:10:46 +08:00
xiongziliang
ae99662a3d
修复编译警告
2022-03-27 21:57:05 +08:00
xiongziliang
2d88115b3f
完善http直播url解析规则pr:#1467
2022-03-12 10:04:36 +08:00
cqm
4cfac989b3
支持?schema=rtmp/ts/fmp4格式
2022-03-03 19:45:47 +08:00
ziyue
96503967fc
屏蔽sendfile特性
2022-02-11 12:03:45 +08:00
ziyue
dc672b14e3
确保32位系统支持超过4GB文件下载
2022-02-10 21:06:51 +08:00