Return on SDP fragment read error. (#4228)

This commit is contained in:
Raja Subramanian
2026-01-09 14:36:41 +05:30
committed by GitHub
parent 7fae5ac9e6
commit 52ab3374c6
+1
View File
@@ -465,6 +465,7 @@ func (s *WHIPService) handleParticipantPatch(w http.ResponseWriter, r *http.Requ
sdpFragmentBytes, err := ioutil.ReadAll(r.Body)
if err != nil {
s.handleError("Patch", w, r, http.StatusBadRequest, fmt.Errorf("body does not have SDP fragment: %s", err))
return
}
sdpFragment := string(sdpFragmentBytes)