Bug 111623 - [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
Summary: [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 14:14 PST by Alexey Proskuryakov
Modified: 2013-03-06 16:38 PST (History)
12 users (show)

See Also:


Attachments
proposed patch (19.21 KB, patch)
2013-03-06 14:38 PST, Alexey Proskuryakov
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2013-03-06 14:14:21 PST
ResourceResponse does not have any clear way to keep platform response and WebCore data in sync. Calling any setter on the response leaves these in inconsistent state.

Furthermore, even if NSURLRequest was originally null, building it from WebCore data is extremely lossy - we don't even use a correct HTTP status code, defaulting to 0.

WebKit2 IPC only encodes NSURLRequest, so the other side will see a bad response with 0 status code for anything that was built synthetically (including but not limited to Blob reading responses).

Until rebuilding an NSURLRequest from platform data is implemented (and that's non-trivial), we'll have to send both over IPC.
Comment 1 Alexey Proskuryakov 2013-03-06 14:38:06 PST
Created attachment 191833 [details]
proposed patch
Comment 2 Brady Eidson 2013-03-06 16:07:03 PST
> Furthermore, even if NSURLRequest was originally null...
> WebKit2 IPC only encodes NSURLRequest...
>Until rebuilding an NSURLRequest from platform data is implemented ...

Did you mean NSURLResponse in each of these sentences?
Comment 3 Brady Eidson 2013-03-06 16:09:51 PST
Comment on attachment 191833 [details]
proposed patch

Not a fan of the huge swath of new fixmes without a bug #, but I think this is fine.
Comment 4 Alexey Proskuryakov 2013-03-06 16:18:54 PST
> Did you mean NSURLResponse in each of these sentences?

Ugh. Yes.

Thank you for reviewing!
Comment 5 Alexey Proskuryakov 2013-03-06 16:38:17 PST
Committed <http://trac.webkit.org/changeset/145007>.