Skip to content

Commit

Permalink
browser(webkit): base64 encode request.postData (#4743)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Dec 16, 2020
1 parent 7385b31 commit e4658ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions browser_patches/webkit/BUILD_NUMBER
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1406
Changed: [email protected] Wed 16 Dec 2020 11:32:50 AM PST
1407
Changed: [email protected] Wed 16 Dec 2020 01:21:38 PM PST
13 changes: 12 additions & 1 deletion browser_patches/webkit/patches/bootstrap.diff
Original file line number Diff line number Diff line change
Expand Up @@ -2943,7 +2943,7 @@ index 3386cb879f1178c1b9635775c9a0e864f5b94c52..d2350182f5f061855e8ca172779ad60e
class Page;
class SecurityOrigin;
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
index 575382e4390dd31dbf404fc72662b2206071c7e8..d6ec8d26d165b110872dea47fa09a9dfa751f37b 100644
index 575382e4390dd31dbf404fc72662b2206071c7e8..cd7fe4765825d36dbb75a6be55ef0dd2cce7263c 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
@@ -45,6 +45,7 @@
Expand All @@ -2962,6 +2962,17 @@ index 575382e4390dd31dbf404fc72662b2206071c7e8..d6ec8d26d165b110872dea47fa09a9df
#include "Page.h"
#include "PlatformStrategies.h"
#include "ProgressTracker.h"
@@ -309,8 +311,8 @@ static Ref<Protocol::Network::Request> buildObjectForResourceRequest(const Resou
.setHeaders(buildObjectForHeaders(request.httpHeaderFields()))
.release();
if (request.httpBody() && !request.httpBody()->isEmpty()) {
- auto bytes = request.httpBody()->flatten();
- requestObject->setPostData(String::fromUTF8WithLatin1Fallback(bytes.data(), bytes.size()));
+ Vector<char> bytes = request.httpBody()->flatten();
+ requestObject->setPostData(base64Encode(bytes));
}
return requestObject;
}
@@ -355,6 +357,8 @@ RefPtr<Protocol::Network::Response> InspectorNetworkAgent::buildObjectForResourc
.setSource(responseSource(response.source()))
.release();
Expand Down

0 comments on commit e4658ea

Please sign in to comment.