[Webkit-unassigned] [Bug 55129] is this a bug?
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 25 00:33:21 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=55129
--- Comment #6 from zywu <elephoenix at gmail.com> 2011-02-25 00:33:21 PST ---
Thanks for your reply.
1)
According to the comment "// FIXME: POST documents are always Reloads, but their subresources should still be Revalidate."
so if the request method is "post",then subresourceCachePolicy() should return
"CachePolicyRevalidate".
But i tried, the "post" method, return "CachePolicyVerify".
I've added debug log as following
=============================================================
CachePolicy FrameLoader::subresourceCachePolicy() const
{
if (m_isComplete)
{
printf("zywu01:CachePolicyVerify\r\n");
return CachePolicyVerify;
}
if (m_loadType == FrameLoadTypeReloadFromOrigin)
{
printf("zywu02:CachePolicyReload\r\n");
return CachePolicyReload;
}
if (Frame* parentFrame = m_frame->tree()->parent()) {
CachePolicy parentCachePolicy = parentFrame->loader()->subresourceCachePolicy();
if (parentCachePolicy != CachePolicyVerify)
{
if(parentCachePolicy == CachePolicyCache)
printf("zywu03:CachePolicyCache\r\n");
else if(parentCachePolicy == CachePolicyReload)
printf("zywu03:CachePolicyReload\r\n");
else if(parentCachePolicy == CachePolicyRevalidate)
printf("zywu03:CachePolicyRevalidate\r\n");
else if(parentCachePolicy ==CachePolicyAllowStale)
printf("zywu03:CachePolicyAllowStale\r\n");
return parentCachePolicy;
}
else
printf("foo\r\n");
}
// FIXME: POST documents are always Reloads, but their subresources should still be Revalidate.
// If we bring the CachePolicy.h and ResourceRequest cache policy enums in sync with each other and
// remember "Revalidate" in ResourceRequests, we can remove this "POST" check and return either "Reload"
// or "Revalidate" if the DocumentLoader was requested with either.
const ResourceRequest& request(documentLoader()->request());
printf("the request method is : %s\r\n", request.httpMethod().latin1().data());
if (request.cachePolicy() == ReloadIgnoringCacheData && !equalIgnoringCase(request.httpMethod(), "post"))
//if (request.cachePolicy() == ReloadIgnoringCacheData && equalIgnoringCase(request.httpMethod(), "post"))
{
printf("zywu04:CachePolicyRevalidate, %s\r\n", request.httpMethod().latin1().data());
return CachePolicyRevalidate;
}
if (m_loadType == FrameLoadTypeReload)
{
printf("zywu05:CachePolicyRevalidate\r\n");
return CachePolicyRevalidate;
}
if (request.cachePolicy() == ReturnCacheDataElseLoad)
{
printf("zywu06:CachePolicyAllowStale\r\n");
return CachePolicyAllowStale;
}
printf("zywu07:CachePolicyVerify\r\n");
return CachePolicyVerify;
}
test webpage is
============================================================
<html xmlns='http://www.w3.org/1999/xhtml'>
<head >
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<title >Form Page: sampleform</title>
</head>
<body>
<h1>Sample form page</h1>
<style type = "text/css">
:focus {
outline-style:auto;
outline-color:red;
}
</style>
<form id='sampleform' method='post' action='https://www.google.com/accounts/ServiceLoginAuth?method=submit' >
<p>
Name: <input type='text' name='Name' value='aaa' />
</p>
<p>
Email: <input type='text' name='Email' value='bbb'/>
</p>
<p>
<input type='button' class="firstInLine" onclick='window.sampleform.submit()' value='submit' />
</p>
</form>
</body>
</html>
Here is the output log:
=============================================================
a the request method is : POST
zywu07:CachePolicyVerify
CachePolicyVerify:https://www.google.com/accounts/mail.gif
a the request method is : POST
zywu07:CachePolicyVerify
CachePolicyVerify:https://www.google.com/accounts/msh.gif
a the request method is : POST
zywu07:CachePolicyVerify
CachePolicyVerify:https://www.google.com/accounts/ig.gif
a the request method is : POST
zywu07:CachePolicyVerify
CachePolicyVerify:https://www.google.com/accounts/sierra.gif
a the request method is : POST
zywu07:CachePolicyVerify
CachePolicyVerify:https://www.google.com/accounts/google_transparent.gif
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list