[Chromium] Unable to repost form data by hitting reload
When the results of a form submission are not in the cache, the user
will see an error page indicating (with a scary warning) that they
would need to hit reload in order to see the page. However, doing
so does not work. Instead, Chrome issues a GET request to the URL.
Original bug report:
1- Load a page with a HTML form that does a POST
2- Submit the form
3- Go back
4- Clear your cache
5- Go forward
6- Observe the 'Confirm Form Resubmission' error page
7- Hit reload
8- Hit OK
9- Notice that the browser sends a GET instead of a POST
Created attachment 43863 [details]
I went about writing a test for this, but sadly it can't work
in DRT or TestShell because neither loads error pages. As a
result I have no way to simulate the steps from comment #0.
Enabling error pages would interfere with existing tests.
I could modify the layoutTestController to support an option
that would enable error pages, but that seems like a much
larger change that I'd rather defer to a separate patch.
(I'd like to land this so I can backport it to the Chrome 4
Comment on attachment 43863 [details]
This sounds reasonable. Again, my confidence here is low. Thanks for explaining why this is hard to test.
I'd prefer grabbing this object via m_frame->loader()->originalRequest(); but that's not essential.
> I'd prefer grabbing this object via m_frame->loader()->originalRequest(); but
> that's not essential.
Oh, good call! Thanks, I'll do that.
Landed as http://trac.webkit.org/changeset/51394