| Index: chrome/browser/download/download_manager.cc
|
| ===================================================================
|
| --- chrome/browser/download/download_manager.cc (revision 12475)
|
| +++ chrome/browser/download/download_manager.cc (working copy)
|
| @@ -1142,11 +1142,15 @@
|
| // an executable is hidden in a benign file extension;
|
| // E.g. my-cat.jpg becomes my-cat.jpg.js if content type is
|
| // application/x-javascript.
|
| + // 4. New extension is not ".tar" for .gz files. For misconfigured web
|
| + // servers, i.e. bug 5772.
|
| FilePath::StringType append_extension;
|
| if (net::GetPreferredExtensionForMimeType(mime_type, &append_extension)) {
|
| if (append_extension != FILE_PATH_LITERAL("txt") &&
|
| append_extension != extension &&
|
| - !IsExecutable(append_extension)) {
|
| + !IsExecutable(append_extension) &&
|
| + (append_extension != FILE_PATH_LITERAL("tar") ||
|
| + extension != FILE_PATH_LITERAL("gz"))) {
|
| extension += FILE_PATH_LITERAL(".");
|
| extension += append_extension;
|
| }
|
|
|