Bug 191046 - [PSON] When process-swapping for a POST request the HTTP body gets dropped
Summary: [PSON] When process-swapping for a POST request the HTTP body gets dropped
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 191138
  Show dependency treegraph
 
Reported: 2018-10-29 15:55 PDT by Chris Dumez
Modified: 2019-10-30 08:41 PDT (History)
5 users (show)

See Also:


Attachments
Patch (18.60 KB, patch)
2018-10-29 16:01 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (22.45 KB, patch)
2018-10-31 08:44 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-10-29 15:55:11 PDT
When process-swapping for a POST request the HTTP body gets dropped, only various sites to fail when PSON is enabled.
Comment 1 Chris Dumez 2018-10-29 15:55:28 PDT
<rdar://problem/45229732>
Comment 2 Chris Dumez 2018-10-29 16:01:01 PDT
Created attachment 353329 [details]
Patch
Comment 3 Alex Christensen 2018-10-30 18:47:27 PDT
Comment on attachment 353329 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353329&action=review

> Source/WebKit/UIProcess/WebPageProxy.cpp:4189
> +    // Make the request whole again before passing it to decidePolicyForNavigationAction().
> +    request.setHTTPBody(requestBody.takeData());

Would it not be better to move this logic to decidePolicyForNavigationAction so we don't have duplicate code?  There could be one comment there explaining why.

> LayoutTests/http/tests/misc/form-post-textplain-cross-site.html:3
> +<title>Regression test for bug 20795 and 100445</title>

And 191046?
Comment 4 Chris Dumez 2018-10-31 08:44:00 PDT
Created attachment 353497 [details]
Patch
Comment 5 WebKit Commit Bot 2018-10-31 09:23:36 PDT
Comment on attachment 353497 [details]
Patch

Clearing flags on attachment: 353497

Committed r237639: <https://trac.webkit.org/changeset/237639>
Comment 6 WebKit Commit Bot 2018-10-31 09:23:37 PDT
All reviewed patches have been landed.  Closing bug.