Bug 111623

Summary: [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Page LoadingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, beidson, danw, gustavo, koivisto, mifenton, mrobinson, psolanki, rakuco, rwlbuis, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch beidson: review+

Alexey Proskuryakov
Reported 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.
Attachments
proposed patch (19.21 KB, patch)
2013-03-06 14:38 PST, Alexey Proskuryakov
beidson: review+
Alexey Proskuryakov
Comment 1 2013-03-06 14:38:06 PST
Created attachment 191833 [details] proposed patch
Brady Eidson
Comment 2 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?
Brady Eidson
Comment 3 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.
Alexey Proskuryakov
Comment 4 2013-03-06 16:18:54 PST
> Did you mean NSURLResponse in each of these sentences? Ugh. Yes. Thank you for reviewing!
Alexey Proskuryakov
Comment 5 2013-03-06 16:38:17 PST
Note You need to log in before you can comment on or make changes to this bug.