From cba8c3c54c1431fda2294857a072d5da384d502b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Thu, 12 Feb 2026 12:20:49 -0300 Subject: [PATCH 1/2] Migrate from postData to postDataEntries in CdpHttpRequest Use postDataEntries (base64-encoded) from CDP protocol instead of the deprecated postData field. Falls back to postData when entries are missing. Ports upstream puppeteer PR #14640. Co-Authored-By: Claude Opus 4.6 --- .../NetworkTests/CdpHttpRequestTests.cs | 78 +++++++++++++++++++ lib/PuppeteerSharp/Cdp/CdpHttpRequest.cs | 26 ++++++- .../Cdp/Messaging/PostDataEntry.cs | 6 ++ lib/PuppeteerSharp/Cdp/Messaging/Request.cs | 2 + 4 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 lib/PuppeteerSharp.Tests/NetworkTests/CdpHttpRequestTests.cs create mode 100644 lib/PuppeteerSharp/Cdp/Messaging/PostDataEntry.cs diff --git a/lib/PuppeteerSharp.Tests/NetworkTests/CdpHttpRequestTests.cs b/lib/PuppeteerSharp.Tests/NetworkTests/CdpHttpRequestTests.cs new file mode 100644 index 000000000..47bccbb5d --- /dev/null +++ b/lib/PuppeteerSharp.Tests/NetworkTests/CdpHttpRequestTests.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using Microsoft.Extensions.Logging; +using NSubstitute; +using NUnit.Framework; +using PuppeteerSharp.Cdp; +using PuppeteerSharp.Cdp.Messaging; + +namespace PuppeteerSharp.Tests.NetworkTests; + +[TestFixture] +public class CdpHttpRequestTests +{ + [Test] + public void ShouldReconstructPostDataFromPostDataEntries() + { + var client = Substitute.For(); + var frame = Substitute.For