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..e3d89627d3c13462ab54da9dd14f120f3c4072a4 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; |
| + |
| + std::string raw_header = "HTTP/1.1 200 OK"; |
| + raw_header += '\0'; |
| + raw_header += "Content-Type: " + mime_type; |
| + if (!charset.empty()) { |
| + raw_header += ";charset="; |
| + raw_header += charset; |
| + } |
| + raw_header += '\0'; |
| + raw_header += "Access-Control-Allow-Origin: *"; |
| + raw_header.append("\0\0", 2); |
| + |
| + info->headers = new net::HttpResponseHeaders(raw_header); |
|
abarth-chromium
2013/11/01 16:48:55
It seems like there should be a higher-level API f
|
| info->mime_type.swap(mime_type); |
| info->charset.swap(charset); |
| info->security_info.clear(); |