Title: [251442] trunk
Revision
251442
Author
[email protected]
Date
2019-10-22 12:03:44 -0700 (Tue, 22 Oct 2019)

Log Message

Carriage return character sometimes missing in SDP c-line
https://bugs.webkit.org/show_bug.cgi?id=203190

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::filterSDP const):
Add missing\r when filterig the c line.

LayoutTests:

* webrtc/datachannel/filter-ice-candidate.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251441 => 251442)


--- trunk/LayoutTests/ChangeLog	2019-10-22 18:10:39 UTC (rev 251441)
+++ trunk/LayoutTests/ChangeLog	2019-10-22 19:03:44 UTC (rev 251442)
@@ -1,3 +1,12 @@
+2019-10-22  youenn fablet  <[email protected]>
+
+        Carriage return character sometimes missing in SDP c-line
+        https://bugs.webkit.org/show_bug.cgi?id=203190
+
+        Reviewed by Eric Carlson.
+
+        * webrtc/datachannel/filter-ice-candidate.html:
+
 2019-10-22  Russell Epstein  <[email protected]>
 
         Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html is a flaky failure

Modified: trunk/LayoutTests/webrtc/datachannel/filter-ice-candidate.html (251441 => 251442)


--- trunk/LayoutTests/webrtc/datachannel/filter-ice-candidate.html	2019-10-22 18:10:39 UTC (rev 251441)
+++ trunk/LayoutTests/webrtc/datachannel/filter-ice-candidate.html	2019-10-22 19:03:44 UTC (rev 251442)
@@ -24,10 +24,10 @@
                 return;
             }
             assert_equals(pc.localDescription.sdp.indexOf("a=candidate"), -1);
-            assert_true(pc.localDescription.sdp.indexOf("c=IN IP4 0.0.0.0") != -1 || pc.localDescription.sdp.indexOf("c=IN IP6 ::") != -1);
+            assert_true(pc.localDescription.sdp.indexOf("c=IN IP4 0.0.0.0\r\n") != -1 || pc.localDescription.sdp.indexOf("c=IN IP6 ::\r\n") != -1);
             if (counter === 0) {
                 pc.createOffer().then((offer) => {
-                    assert_true(offer.sdp.indexOf("c=IN IP4 0.0.0.0") != -1 || pc.localDescription.sdp.indexOf("c=IN IP6 ::") != -1);
+                    assert_true(offer.sdp.indexOf("c=IN IP4 0.0.0.0\r\n") != -1 || pc.localDescription.sdp.indexOf("c=IN IP6 ::\r\n") != -1);
                     assert_equals(offer.sdp.indexOf("a=candidate"), -1);
                     resolve();
                 });
@@ -56,12 +56,12 @@
                 counter++;
                 return;
             }
-            assert_true(pc.localDescription.sdp.indexOf("c=IN IP4 0.0.0.0") == -1 && pc.localDescription.sdp.indexOf("c=IN IP6 ::") === -1);
+            assert_true(pc.localDescription.sdp.indexOf("c=IN IP4 0.0.0.0\r\n") === -1 && pc.localDescription.sdp.indexOf("c=IN IP6 ::\r\n") === -1);
             assert_false(pc.localDescription.sdp.indexOf("a=candidate") === -1);
             if (counter !== 0) {
                 // Redoing an offer now that we have some candidates.
                 pc.createOffer().then((offer) => {
-                    assert_true(offer.sdp.indexOf("c=IN IP4 0.0.0.0") == -1 && pc.localDescription.sdp.indexOf("c=IN IP6 ::") === -1);
+                    assert_true(offer.sdp.indexOf("c=IN IP4 0.0.0.0\r\n") === -1 && pc.localDescription.sdp.indexOf("c=IN IP6 ::\r\n") === -1);
                     assert_false(offer.sdp.indexOf("a=candidate") === -1);
                     resolve();
                 });

Modified: trunk/Source/WebCore/ChangeLog (251441 => 251442)


--- trunk/Source/WebCore/ChangeLog	2019-10-22 18:10:39 UTC (rev 251441)
+++ trunk/Source/WebCore/ChangeLog	2019-10-22 19:03:44 UTC (rev 251442)
@@ -1,5 +1,18 @@
 2019-10-22  youenn fablet  <[email protected]>
 
+        Carriage return character sometimes missing in SDP c-line
+        https://bugs.webkit.org/show_bug.cgi?id=203190
+
+        Reviewed by Eric Carlson.
+
+        Covered by updated test.
+
+        * Modules/mediastream/PeerConnectionBackend.cpp:
+        (WebCore::PeerConnectionBackend::filterSDP const):
+        Add missing\r when filterig the c line.
+
+2019-10-22  youenn fablet  <[email protected]>
+
         Remove mayHaveServiceWorkerRegisteredForOrigin
         https://bugs.webkit.org/show_bug.cgi?id=203055
 

Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (251441 => 251442)


--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp	2019-10-22 18:10:39 UTC (rev 251441)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp	2019-10-22 19:03:44 UTC (rev 251442)
@@ -422,9 +422,9 @@
     StringBuilder filteredSDP;
     sdp.split('\n', [&filteredSDP](StringView line) {
         if (line.startsWith("c=IN IP4"))
-            filteredSDP.append("c=IN IP4 0.0.0.0");
+            filteredSDP.append("c=IN IP4 0.0.0.0\r");
         else if (line.startsWith("c=IN IP6"))
-            filteredSDP.append("c=IN IP6 ::");
+            filteredSDP.append("c=IN IP6 ::\r");
         else if (!line.startsWith("a=candidate"))
             filteredSDP.append(line);
         else if (line.find(" host ", 11) == notFound)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to