summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-08 21:27:21 +0100
committerKristian Monsen <kristianm@google.com>2010-09-08 21:37:13 +0100
commit472af069773f3dc93829982cdd1a6f66477000ed (patch)
treeb03f66124d96ad1caabf4750e2bfc80c1aa2c748 /WebKit
parent1bc3da8082294f8803b6faaa8126165aa398efb9 (diff)
downloadexternal_webkit-472af069773f3dc93829982cdd1a6f66477000ed.zip
external_webkit-472af069773f3dc93829982cdd1a6f66477000ed.tar.gz
external_webkit-472af069773f3dc93829982cdd1a6f66477000ed.tar.bz2
Set mime type for special android urls
Change-Id: I66f1643c78563c8aa7d9941b788f7533a8185cb4
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/ChromiumIncludes.h1
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/ChromiumIncludes.h b/WebKit/android/WebCoreSupport/ChromiumIncludes.h
index 0ba57e2..a7abef1 100644
--- a/WebKit/android/WebCoreSupport/ChromiumIncludes.h
+++ b/WebKit/android/WebCoreSupport/ChromiumIncludes.h
@@ -54,6 +54,7 @@
#include <net/base/cookie_monster.h>
#include <net/base/data_url.h>
#include <net/base/io_buffer.h>
+#include <net/base/mime_util.h>
#include <net/base/ssl_config_service.h>
#include <net/http/http_auth_handler_factory.h>
#include <net/http/http_cache.h>
diff --git a/WebKit/android/WebCoreSupport/WebRequest.cpp b/WebKit/android/WebCoreSupport/WebRequest.cpp
index 74a37c7..10b0cc7 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequest.cpp
@@ -177,7 +177,10 @@ void WebRequest::handleAndroidURL()
}
m_loadState = Response;
- WebResponse webResponse(m_url, "", 0, "", 200);
+ FilePath path(m_url);
+ std::string mimeType("");
+ net::GetMimeTypeFromFile(path, &mimeType);
+ WebResponse webResponse(m_url, mimeType, 0, "", 200);
LoaderData* loaderResponse = new LoaderData(m_urlLoader, webResponse);
m_urlLoader->maybeCallOnMainThread(WebUrlLoaderClient::didReceiveResponse, loaderResponse);