Describe the bug
Normally, users should access the WHIP API using HTTP POST. But sometimes, users might habitually paste the WHIP API into the browser to access it. In this case, the error logs from SRS are not very clear, and there isn't a clear error response either.
Version
SRS 5.0 and 6.0
To Reproduce
Steps to reproduce the behavior:
Run SRS by ./objs/srs -c conf/console.conf
Use curl to request WHIP API: curl -v 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream'
The response is not clear:
curl -v 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream'
* Trying 127.0.0.1:1985...
* Connected to localhost (127.0.0.1) port 1985 (#0)
> GET /rtc/v1/whip/?app=live&stream=livestream HTTP/1.1
> Host: localhost:1985
> User-Agent: curl/8.1.2
> Accept: */*
>
* Empty reply from server
* Closing connection 0
curl: (52) Empty reply from server
Expected behavior
SRS should use more specific error codes, instead of the current now only support BUNDLE.
SRS should return error codes and messages in the HTTP Response.
Additional context
Note: Previously, no error response was returned, primarily for simplicity. Also, when returning a response, sensitive information needs to be avoided. There were many factors to consider, so detailed error messages were not returned.
Describe the bug Normally, users should access the WHIP API using HTTP POST. But sometimes, users might habitually paste the WHIP API into the browser to access it. In this case, the error logs from SRS are not very clear, and there isn't a clear error response either.
Version SRS 5.0 and 6.0
To Reproduce Steps to reproduce the behavior:
./objs/srs -c conf/console.conf
curl -v 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream'
Expected behavior SRS should use more specific error codes, instead of the current
now only support BUNDLE
. SRS should return error codes and messages in the HTTP Response.Additional context Note: Previously, no error response was returned, primarily for simplicity. Also, when returning a response, sensitive information needs to be avoided. There were many factors to consider, so detailed error messages were not returned.
TRANS_BY_GPT4