diff options
author | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 21:13:20 +0000 |
---|---|---|
committer | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 21:13:20 +0000 |
commit | fdeb7a81b13e68dae850a7d56347fa6a13405815 (patch) | |
tree | 13e8f453223a4637f5f1049d66d1e18f394ec4e7 /webkit/fileapi/file_system_url_request_job.h | |
parent | a1ce752721b6e3c5307a1a202ae01b9a26f442cb (diff) | |
download | chromium_src-fdeb7a81b13e68dae850a7d56347fa6a13405815.zip chromium_src-fdeb7a81b13e68dae850a7d56347fa6a13405815.tar.gz chromium_src-fdeb7a81b13e68dae850a7d56347fa6a13405815.tar.bz2 |
Add 'Cache-Control: no-cache' to filesystem: responses to avoid
having them improperly cached in WebKit's memory cache.
Note that this change as currently written may be unnecessarily
bad for performance, since the file must be read from disk on
every access. For some use cases, this could be quite expensive.
The right fix is probably to put a 'Last-Modified' header in the
response along with 'Cache-Control: max-age: 0', but for now
I'm favoring correctness over performance.
R=michaeln@chromium.org
BUG=79539
TEST=layout test at http://webkit.org/b/58854
Review URL: http://codereview.chromium.org/6879022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82156 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_url_request_job.h')
-rw-r--r-- | webkit/fileapi/file_system_url_request_job.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webkit/fileapi/file_system_url_request_job.h b/webkit/fileapi/file_system_url_request_job.h index ffef027..6d0f6e3 100644 --- a/webkit/fileapi/file_system_url_request_job.h +++ b/webkit/fileapi/file_system_url_request_job.h @@ -40,13 +40,12 @@ class FileSystemURLRequestJob : public net::URLRequestJob { virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); virtual bool IsRedirectResponse(GURL* location, int* http_status_code); virtual void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers); + virtual void GetResponseInfo(net::HttpResponseInfo* info); + virtual int GetResponseCode() const; // FilterContext methods (via URLRequestJob): virtual bool GetMimeType(std::string* mime_type) const; - // TODO(adamk): Implement GetResponseInfo and GetResponseCode to simulate - // an HTTP response. - private: virtual ~FileSystemURLRequestJob(); @@ -68,6 +67,7 @@ class FileSystemURLRequestJob : public net::URLRequestJob { net::CompletionCallbackImpl<FileSystemURLRequestJob> io_callback_; scoped_ptr<net::FileStream> stream_; bool is_directory_; + scoped_ptr<net::HttpResponseInfo> response_info_; net::HttpByteRange byte_range_; int64 remaining_bytes_; |