Index: content/child/web_url_loader_impl.cc |
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc |
index 18d8b82cce2dd465e40bf4685394354474523339..9c3578b8a3e6d28d3aa9fd4f00651061f0f86ebd 100644 |
--- a/content/child/web_url_loader_impl.cc |
+++ b/content/child/web_url_loader_impl.cc |
@@ -137,7 +137,19 @@ bool GetInfoFromDataURL(const GURL& url, |
info->load_timing.request_start_time = now; |
info->request_time = now; |
info->response_time = now; |
- info->headers = NULL; |
+ |
+ scoped_refptr<net::HttpResponseHeaders> headers( |
+ new net::HttpResponseHeaders(std::string())); |
+ headers->ReplaceStatusLine("HTTP/1.1 200 OK"); |
+ DCHECK(!mime_type.empty()); |
+ DCHECK(!charset.empty()); |
+ std::string content_type_header = |
+ "Content-Type: " + mime_type + ";charset=" + charset; |
abarth-chromium
2014/03/24 16:40:30
Do we know that mime_type and charset are such tha
tyoshino (SeeGerritForStatus)
2014/03/26 17:34:07
Added mime_type grammar check in net::DataURL::Par
|
+ headers->AddHeader(content_type_header); |
+ headers->AddHeader("Access-Control-Allow-Origin: *"); |
+ headers->AddHeader("Access-Control-Allow-Credentials: true"); |
abarth-chromium
2014/03/24 16:40:30
I don't think you can combine Access-Control-Allow
tyoshino (SeeGerritForStatus)
2014/03/24 19:36:58
robwu@ suggested this change in #21. With https://
|
+ info->headers = headers; |
+ |
info->mime_type.swap(mime_type); |
info->charset.swap(charset); |
info->security_info.clear(); |