Winlin
f392f9a5a7
WHIP: Return detailed HTTP error responses with proper status codes. v7.0.121 ( #4502 ) ( #4562 )
...
This commit addresses issue #4502 by implementing proper HTTP error
handling
for WHIP endpoints, allowing clients to receive detailed error
information
instead of empty responses.
Before this change:
- WHIP clients received "Empty reply from server" when publish failed
- No way to distinguish between different failure reasons
After this change:
- WHIP clients receive proper HTTP status codes (400/401/409/500)
- Error responses include error code and description
- Clients can distinguish between SDP errors, stream busy, auth
failures, etc.
If success:
```
< HTTP/1.1 201 Created
< Content-Type: application/sdp
< Location: /rtc/v1/whip/?action=delete&token=77h5570j1&app=live&stream=livestream&session=x209e499:TKxW
< Content-Length: 1376
< Server: SRS/7.0.120(Kai)
<
v=0
......
```
If request without SDP:
```
curl 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream ' -v
< HTTP/1.1 400 Bad Request
< Content-Type: text/plain; charset=utf-8
< Content-Length: 13
< Server: SRS/7.0.120(Kai)
<
5043: RtcInvalidSdp
```
If request with corrupt SDP:
```
curl 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream ' --data-raw $'invalidsdp' -v
< HTTP/1.1 400 Bad Request
< Content-Type: text/plain; charset=utf-8
< Content-Length: 18
< Server: SRS/7.0.120(Kai)
<
5012: RtcSdpDecode
```
If request with insufficient SDP:
```
curl 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream ' --data-raw $'v=0' -v
< HTTP/1.1 400 Bad Request
< Content-Type: text/plain; charset=utf-8
< Content-Length: 21
< Server: SRS/7.0.120(Kai)
<
5018: RtcSdpNegotiate
```
If publish to a exists stream:
```
< HTTP/1.1 409 Conflict
< Content-Type: text/plain; charset=utf-8
< Content-Length: 16
< Server: SRS/7.0.120(Kai)
<
1028: StreamBusy
```
If HTTP hooks or security verify failed:
```
< HTTP/1.1 401 Unauthorized
< Content-Type: text/plain; charset=utf-8
< Content-Length: 16
< Server: SRS/7.0.120(Kai)
<
1102: SystemAuth
```
Other errors, for exmaple, RTC disabled:
```
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain; charset=utf-8
< Content-Length: 17
< Server: SRS/7.0.120(Kai)
<
5021: RtcDisabled
```
---------
Co-authored-by: OSSRS-AI <winlinam@gmail.com>
2025-11-07 21:05:41 -05:00
OSSRS-AI
35d0e3d7c7
AI: Add workflow utest for SRT conn
2025-10-19 13:23:20 -04:00
winlin
49594b1846
Update stable version to SRS 6.0
2025-09-15 11:23:02 -04:00
Winlin
8f87d4092b
AI: Fix naming problem in kernel module. v7.0.82 ( #4479 )
...
Co-authored-by: OSSRS-AI <winlinam@gmail.com>
2025-09-07 21:09:08 -04:00
Winlin
1fa2cba7c0
Organize utility functions to kernel. v7.0.65 ( #4455 )
2025-08-27 21:35:58 -04:00
Winlin
6e1134fe9b
Use clang format. v7.0.52 ( #4433 )
...
---------
Co-authored-by: ChenGH <chengh_math@126.com>
2025-08-11 23:19:19 -04:00
ChenGH
13597d1b7f
update copyright to 2025. v5.0.218 v6.0.159 v7.0.21 ( #4271 )
...
update copyright to 2025
---------
Co-authored-by: john <hondaxiao@tencent.com>
Co-authored-by: winlin <winlinvip@gmail.com>
2025-01-14 17:35:18 +08:00
Winlin
d4248503e7
ASAN: Disable memory leak detection by default. v7.0.8 ( #4154 )
...
By setting the env `ASAN_OPTIONS=halt_on_error=0`, we can ignore memory
leaks, see
https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
By setting env `ASAN_OPTIONS=detect_leaks=0`, we can disable memory
leaking detection in parent process when forking for daemon.
2024-08-22 18:43:45 +08:00
winlin
2a2da2253f
Switch to 2013-2024. v6.0.109
2024-01-01 10:51:24 +08:00
winlin
29eff1a242
Refine LICENSE.
2023-10-23 14:33:19 +08:00
chundonglinlin
571043ff3d
WebRTC: Error message carries the SDP when failed. v5.0.151, v6.0.39 ( #3450 )
...
Co-authored-by: winlin <winlin@vip.126.com>
Co-authored-by: ChenGH <chengh_math@126.com>
2023-03-27 22:27:01 +08:00
winlin
c46ef81ff2
SRS5: Update license date to 2023. v5.0.123
...
PICK 72f8ed4916
2023-01-01 08:56:20 +08:00
ChenGH
7eaee46f1f
Asan: Support parse asan symbol backtrace log. v5.0.113 ( #3324 )
...
* asan: support parse asan symbol log
* asan: refine srs_parse_asan_backtrace_symbols error code
* asan: Refine code, extract asan log to error file.
Co-authored-by: winlin <winlin@vip.126.com>
2022-12-18 21:14:11 +08:00
winlin
e10fa6dc91
Kernel: Support grab backtrace stack when assert fail. v5.0.80
2022-10-21 23:37:30 +08:00
winlin
9c81a0e1bd
UTest: Fix utest warnings.
2022-10-06 16:09:07 +08:00
winlin
3e2f8622f8
APM: Support distributed tracing by Tencent Cloud APM. v5.0.63
2022-09-16 18:54:28 +08:00
winlin
f9e8065b51
Fix build warnings.
2022-08-09 08:27:08 +08:00
winlin
5ae495ab95
For #1229 : Check the return value of vsnprintf.
2022-08-08 08:31:57 +08:00
winlin
d117145b95
Update date from 2021 to 2022.
2022-06-20 19:22:25 +08:00
winlin
d5c86dc5fa
Switch LICENSE from MIT to **MIT or MulanPSL-2.0**. v5.0.21
2022-01-13 18:40:22 +08:00
Winlin
c8a1e0f3da
Refine AUTHORS.txt to AUTHORS.md, etc. 5.0.8 ( #2464 )
...
* Refine AUTHORS.txt to AUTHORS.md, etc. 5.0.8
* Update README.md
* Update README.md
* Refine format for AUTHORS.md
2021-07-08 14:30:47 +08:00
winlin
15901cacee
SquashSRS4: Use SPDX-License-Identifier: MIT. 5.0.3
2021-05-31 13:42:20 +08:00
winlin
8b74c7cb89
SquashSRS4: Happy 2021
2021-04-16 09:29:43 +08:00
winlin
6624b8acca
Log: Use object as context id for complex context
2020-07-05 23:26:55 +08:00
winlin
6118ca382a
For #1638 , #307 , http api success with message, timeout as such
2020-03-17 11:40:05 +08:00
winlin
d783a12f89
Happy 2020
2019-12-30 10:10:35 +08:00
winlin
043781fe81
Fix #1544 , fix memory leaking for complex error. 3.0.87
2019-12-27 11:46:07 +08:00
winlin
dffc96d2fe
For #1537 , disable crossbuild for ARM/MIPS.
2019-12-25 13:17:49 +08:00
winlin
191b07668d
Refactor HTTP stream to disconnect client when unpublish
2019-12-17 16:54:06 +08:00
winlin
ba02640c46
Refine tid in error log
2019-11-29 12:33:32 +08:00
winlin
a9a720e32f
Cover ST Coroutine and time unit. 3.0.48
2019-04-07 12:59:37 +08:00
winlin
b2d1d84634
Change to 2019
2019-01-01 21:37:28 +08:00
winlin
ca1395a807
Change date from 2017 to 2018
2018-01-07 10:58:53 +08:00
winlin
9802dc326e
For #913 , source support complex error
2017-09-23 22:12:33 +08:00
winlin
9f5224c34a
For #913 , use complex error for http
2017-07-29 21:39:57 +08:00
winlin
5c9a12e72a
For #913 , use complex error for listener
2017-07-29 12:45:17 +08:00
winlin
9db2a04c3b
For #913 , coroutine support complex error.
2017-06-11 18:44:20 +08:00
winlin
7275fd5397
Fix #916 , build failed for headers for error.
2017-06-11 09:03:29 +08:00
winlin
bb200b5d2d
For #913 , add complex error.
2017-06-09 11:50:35 +08:00
winlin
0a57a46016
Refine LICENSE
2017-03-25 21:29:29 +08:00
winlin
f32aab3d92
For #299 , refine code.
2017-03-25 17:21:39 +08:00
winlin
7ac932cfa0
update to 2013-2017
2016-12-16 11:57:25 +08:00
winlin
d24aef50ba
for #369 , support RTMP 302 api at protocol level.
2016-01-08 18:17:37 +08:00
winlin
d0c74fa7cd
update 2015 to 2016
2015-12-23 11:35:40 +08:00
winlin
1ffd5fd455
rename org simple-rtmp-server to ossrs
2015-11-11 10:37:50 +08:00
winlin
46a81372e7
fix #398 , set recv timeout for http connection.
2015-05-22 13:57:04 +08:00
winlin
b23e196f20
migarate from winlinvip to srs org, move the copyright to srs org.
2015-04-29 17:38:23 +08:00
winlin
569596c10d
update copyright, from 2013 to 2015
2014-12-31 20:32:09 +08:00
winlin
7b24788445
for bug #143 , build on centos5.
2014-08-02 22:18:39 +08:00
winlin
c85dde7f3f
substitute all TAB with 4spaces.
2014-03-18 11:32:58 +08:00