mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879654: Tolerate '?transport=udp' by stripping it r=jesup
This commit is contained in:
parent
3cb81d0925
commit
0a5c597380
@ -54,7 +54,7 @@
|
||||
{ url:"stun:0.0.0.0" },
|
||||
{ url:"stuns:x.net", foo:"" },
|
||||
{ url:"turn:[::192.9.5.5]:42", username:"p", credential:"p" },
|
||||
{ url:"turns:x.org:42", username:"p", credential:"p" }
|
||||
{ url:"turns:x.org:42?transport=udp", username:"p", credential:"p" }
|
||||
]}, true);
|
||||
|
||||
pcs = null;
|
||||
|
@ -399,7 +399,8 @@ PeerConnectionImpl::CreateRemoteSourceStreamInfo(nsRefPtr<RemoteSourceStreamInfo
|
||||
* In JS, an RTCConfiguration looks like this:
|
||||
*
|
||||
* { "iceServers": [ { url:"stun:23.21.150.121" },
|
||||
* { url:"turn:turn.example.org", credential:"mypass", "username"} ] }
|
||||
* { url:"turn:turn.example.org?transport=udp",
|
||||
* username: "jib", credential:"mypass"} ] }
|
||||
*
|
||||
* This function converts an already-validated jsval that looks like the above
|
||||
* into an IceConfiguration object.
|
||||
@ -449,6 +450,13 @@ PeerConnectionImpl::ConvertRTCConfiguration(const JS::Value& aSrc,
|
||||
nsAutoCString path;
|
||||
rv = url->GetPath(path);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Tolerate '?transport=udp' by stripping it.
|
||||
int32_t questionmark = path.FindChar('?');
|
||||
if (questionmark >= 0) {
|
||||
path.SetLength(questionmark);
|
||||
}
|
||||
|
||||
rv = net_GetAuthURLParser()->ParseAuthority(path.get(), path.Length(),
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
|
Loading…
Reference in New Issue
Block a user