ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.37k stars 5.34k forks source link

improve http response when err happens. #4073

Open suzp1984 opened 3 months ago

suzp1984 commented 3 months ago
  1. response 200 with code when rtc/v1 remote sdp parse error;
  2. response 500 when no handled err.

Try to improve two problem:

  1. let rtc/v1/[whep|whip] response 200 with body {code : 400} when remote_sdp parse error happen by follow rtc/v1/[play | publish] api's response. The current behavior in this scenario is close the connection without response anything.

  2. Let SrsHttpServeMux response 500 when err not handled, the current behavior is also to close the socket connection without response anything.