diff --git a/internal/protocols/webrtc/whip_client.go b/internal/protocols/webrtc/whip_client.go index 0a6299648bc0..11ba4c6904e2 100644 --- a/internal/protocols/webrtc/whip_client.go +++ b/internal/protocols/webrtc/whip_client.go @@ -7,6 +7,7 @@ import ( "io" "net/http" "net/url" + "strings" "time" "github.com/bluenviron/gortsplib/v4/pkg/format" @@ -285,7 +286,7 @@ func (c *WHIPClient) postOffer( } contentType := res.Header.Get("Content-Type") - if contentType != "application/sdp" { + if strings.Trim(strings.Split(contentType, ";")) != "application/sdp" { return nil, fmt.Errorf("bad Content-Type: expected 'application/sdp', got '%s'", contentType) }