Chromium Code Reviews| Index: webkit/child/weburlloader_impl.cc |
| diff --git a/webkit/child/weburlloader_impl.cc b/webkit/child/weburlloader_impl.cc |
| index 09273f8881b2fe825a330bfc50fbf72138860e49..cbabccb06c62a5786ddc6737d7ec766c058932ae 100644 |
| --- a/webkit/child/weburlloader_impl.cc |
| +++ b/webkit/child/weburlloader_impl.cc |
| @@ -132,7 +132,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"); |
| + std::string content_type_header = "Content-Type: " + mime_type; |
|
sof
2013/11/08 13:34:34
Slight inconsistency in assumptions here; you don'
tyoshino (SeeGerritForStatus)
2013/11/12 05:47:26
Thanks. I see. It's well documented in the comment
|
| + if (!charset.empty()) { |
| + content_type_header += ";charset="; |
| + content_type_header += charset; |
| + } |
| + headers->AddHeader(content_type_header); |
| + headers->AddHeader("Access-Control-Allow-Origin: *"); |
| + info->headers = headers; |
| + |
| info->mime_type.swap(mime_type); |
| info->charset.swap(charset); |
| info->security_info.clear(); |