Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=5499
Page reload does not send any cache control headers
WebCore:
* bindings/js/kjs_window.cpp:
(KJS::LocationFunc::callAsFunction): Call scheduleRefresh() for Location::Reload.
* page/Frame.h: Add scheduleRefresh(). Don't derive from TransferJob or implement its methods - that was
used only for storing response HTTP headers, which was an overkill.
* page/FramePrivate.h: Replace TransferJob with a HashMap for storing response headers.
* page/Frame.cpp:
(WebCore::Frame::didOpenURL): Don't needlessly change d->m_cachePolicy. Don't create a TransferJob.
(WebCore::Frame::stopLoading): Directly access the metadata map, instead of going through a TransferJob.
(WebCore::Frame::receivedFirstData): Ditto.
(WebCore::Frame::addMetaData): Ditto.
(WebCore::Frame::scheduleRefresh): A new function that schedules a refresh, similarly to what
scheduleRedirection() does.
(WebCore::Frame::changeLocation): Set request.reload attribute based on the current cache policy.
WebKit:
* WebView/WebFrame.m:
(-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]): Set a proper Cache-Control header for
reload requests.
(-[WebFrame loadRequest:]): Reset loadType to WebFrameLoadTypeStandard (after a reload, it stayed at
WebFrameLoadTypeReload, so _addExtraFieldsToRequest erroneously added a Cache-Control header to them).
LayoutTests:
* http/tests/misc/refresh-headers-expected.txt: Added.
* http/tests/misc/refresh-headers.php: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14920
268f45cc-cd09-0410-ab3c-
d52691b4dbfc