Bug 132613

Summary: URI doesn't get updated for cached 301 redirects
Product: WebKit Reporter: mschiffer
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Bugfix none

Description mschiffer 2014-05-06 10:07:55 PDT
Version: webkit2-gtk3.0 2.4.1

In webkit2, the "uri" property/the URI returned by webkit_web_view_get_uri() doesn't get updated after following a cached 301 redirect. When the request is made for the first time and is thus not cached, it gets updated correctly.

I can reproduce this with both Epiphany and my own code. Webkit1 doesn't exhibit this behaviour.
Comment 1 mschiffer 2014-05-08 05:37:10 PDT
I've now further debugged this.

The WebKitWebView never gets a load-changed signal with WEBKIT_LOAD_REDIRECTED for cached redirects, as it would normally be triggered by WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad(), which is called by ResourceLoader::willSendRequest(), but the ResourceLoader is not active for cached requests.

I think to fix this, it'd be necessary to move the WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad() call to CachedRawResource or DocumentLoader. Does this make sense? I don't know the code very well, but if you agree with my analysis, I can try cooking up a patch.
Comment 2 mschiffer 2014-05-09 09:07:26 PDT
Created attachment 231159 [details]
Bugfix

This patch fixes the problem for me, both in Epiphany and my own application.
Comment 3 mschiffer 2014-05-17 03:03:51 PDT
Hi,
it's been more that a week since I reported this bug *and* provided a patch. Anyone looked at it yet?
Comment 4 mschiffer 2014-06-14 07:31:52 PDT
It'd be really nice if I could a least get a reaction on my bug report, which is now over a month old.
Comment 5 mschiffer 2014-07-11 05:53:18 PDT
Pinging again. Anyone willing to look at this bug report? It's been two months since I provided a patch...
Comment 6 mschiffer 2014-08-17 02:05:21 PDT
I can't reproduce this bug with the current version (webkit2-gtk3 2.4.4) anymore, so I guess it's been fixed.