mirror of
https://github.com/bluenviron/mediamtx
synced 2025-01-19 05:21:09 +00:00
webrtc: support charset in Content-Type of WHIP offer responses (#3274)
This commit is contained in:
parent
dc3eae7f96
commit
4ed1a39da2
@ -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.TrimSpace(strings.Split(contentType, ";")[0]) != "application/sdp" {
|
||||
return nil, fmt.Errorf("bad Content-Type: expected 'application/sdp', got '%s'", contentType)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user