Return on SDP fragment read error. (#4228)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user