| Index: net/url_request/url_request_data_job.cc
|
| diff --git a/net/url_request/url_request_data_job.cc b/net/url_request/url_request_data_job.cc
|
| index e0746467079836f42aff97cdbe2029b6e5669eb9..9d1a282656c6169766818267ceeafa57bb6ab156 100644
|
| --- a/net/url_request/url_request_data_job.cc
|
| +++ b/net/url_request/url_request_data_job.cc
|
| @@ -7,6 +7,7 @@
|
| #include "net/url_request/url_request_data_job.h"
|
|
|
| #include "net/base/data_url.h"
|
| +#include "net/base/mime_util.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/http/http_response_headers.h"
|
| #include "url/gurl.h"
|
| @@ -34,9 +35,11 @@ int URLRequestDataJob::BuildResponse(const GURL& url,
|
| // the "token" ABNF in the HTTP spec. When DataURL::Parse() call is
|
| // successful, it's guaranteed that the string in |charset| follows the
|
| // "token" ABNF.
|
| - std::string content_type_header =
|
| - "Content-Type: " + *mime_type + ";charset=" + *charset;
|
| - headers->AddHeader(content_type_header);
|
| + if (ParseMimeTypeWithoutParameter(*mime_type, NULL, NULL)) {
|
| + std::string content_type_header =
|
| + "Content-Type: " + *mime_type + ";charset=" + *charset;
|
| + headers->AddHeader(content_type_header);
|
| + }
|
| headers->AddHeader("Access-Control-Allow-Origin: *");
|
| }
|
|
|
|
|