1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

impl SRS /api/v1/clients api.

This commit is contained in:
Jacob Su 2024-10-26 23:51:01 +08:00
parent 0b7fbe746e
commit a91d98e1ad
6 changed files with 233 additions and 11 deletions

View file

@ -198,7 +198,7 @@ func (v *HTTPFlvTsConnection) ServeHTTP(w http.ResponseWriter, r *http.Request)
ctx := logger.WithContext(v.ctx)
if err := v.serve(ctx, w, r); err != nil {
apiError(ctx, w, r, err)
apiError(ctx, w, r, err, http.StatusInternalServerError)
} else {
logger.Df(ctx, "HTTP client done")
}
@ -318,7 +318,7 @@ func (v *HLSPlayStream) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
if err := v.serve(v.ctx, w, r); err != nil {
apiError(v.ctx, w, r, err)
apiError(v.ctx, w, r, err, http.StatusInternalServerError)
} else {
logger.Df(v.ctx, "HLS client %v for %v with %v done",
v.SRSProxyBackendHLSID, v.StreamURL, r.URL.Path)