New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 725891 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Different behavior in uppercase or lowercase extension of downloaded pdf file

Project Member Reported by vnikolov@chromium.org, May 24 2017

Issue description

Chrome Version       :  58.0.3029.96 and Canary
Windows: tested on version 7 and version 10

Steps To Reproduce: 
(1) Set up PDF files to be opened upon downloading with the "Always open with system viewer" function 
(2) Download a PDF file with extension .PDF

What is the expected result?
The file gets immediately opened upon completing the download in a new tab

What happens instead?
The file gets downloaded and nothing else happens

How frequently does this problem reproduce? Always

Screenshot of the setting (PII protected): https://drive.google.com/open?id=0B0-4QrI1tbXfSnktMldjSjk5N1k

Issue is not reproducible if the pdf file has a lower case extension - .pdf
 
Labels: hotlist-enterprise-support
Cc: marcore@google.com
Labels: Hotlist-Enterprise M-60 M-58 OS-Linux
Status: Untriaged (was: Unconfirmed)
Summary: Different behavior in uppercase or lowercase extension of downloaded file (was: Different behavior in .pdf and .PDF files)
I was able to reproduce on windows 7 and Linux
on Windows, firefox and Internet explorer downloads and displays correctly (external program) the file with uppercase or lowercase extension
example files:
blank_page.pdf https://drive.google.com/open?id=0B01ZVp8vDQocdHQwbkVSQ3VHOWM
blank_page.PDF https://drive.google.com/open?id=0B01ZVp8vDQocSTd6V1IzbXBMRnM

HAR file of downloading the files as mail attachment:

.pdf https://drive.google.com/open?id=0B01ZVp8vDQocbEFxRkttU0dBVzg
.PDF https://drive.google.com/open?id=0B01ZVp8vDQocRUtUSENhdVh5SUk

extract of HAR files:
response from the server:
content-disposition attachment; filename="blank_page.PDF"
content-length 16305
content-type application/pdf

content-disposition attachment; filename="blank_page.pdf"
content-length 16305
content-type application/pdf

Owner: gov...@chromium.org
Hi Krishna,
Could you help triage this issue ?
Summary: Different behavior in uppercase or lowercase extension of downloaded pdf file (was: Different behavior in uppercase or lowercase extension of downloaded file)

Comment 5 by gov...@chromium.org, May 24 2017

Cc: ligim...@chromium.org
Owner: ----
+ligimole@, could you please try to repro and bisect if possible.
the issue is ONLY for .pdf files other files, .zip, .docx .xlsx works.
Cc: pastarmovj@chromium.org
Components: UI>Browser>Downloads Internals>Plugins>PDF
Probably DownloadCommands::IsDownloadPdf() needs to check for .PDF in addition to .pdf.
FilePath::MatchesExtension already does FilePath::CompareEqualIgnoreCase(extension, current_extension) so it should be case insensitive.

I think the issue here is this - Chrome sees .pdf and .PDF as two separate file types and you have to select the "automatically open" for each type individually. The automatic opening of .pdf is rather a leftover from the initial way this setting was implemented where it did indeed default to automatic opening. This was changed though for security reasons but for some reasons the auto-open flag was remembered in their settings. Now it is up to the user to select to automatically open or not each file type from the menu on the right of the downloaded file.
@pastarmovj in this small video https://drive.google.com/open?id=0B01ZVp8vDQocUlBMZHU4QmlOc28 the "automatically open" for the .PDF file is already checked after is checked for the .pdf file 

also, if I go to chrome://downloads and I click on the filename(with .PDF extension) it's opened in Acrobat Reader (default system viewer)
Labels: Needs-Triage-M60 Needs-Bisect
Thanks for the video, will  try a repro and update the thread.
Cc: jmukthavaram@chromium.org
Labels: -Type-Bug -Pri-3 -Needs-Bisect -Needs-Triage-M60 hasbisect OS-Mac Pri-1 Type-Bug-Regression
Able to reproduce the issue on Windows 7, mac 10.12.4 & Ubuntu 14.04 using chrome reported version#58.0.3029.96 , Stable#58.0.3029.110 & Canary#61.0.3114.0 as per comment#0.
Manual Bisect:
--------------
Good-43.0.2327.0 --Revision-319600
Bad-43.0.2328.0 --Revision-319833

Bisect info:(Unable to provide bisect with new script)
-------------
You are probably looking for a change made after 319805 (known good), but no lat
er than 319821 (first known bad).
CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/5ddb1905aa591a2bfa6ab43d7fe2226e4cba6d81..72bf8d182a23c36614fd049c276d6a34e991cc02

Unable to find the exact suspect from the above change log.Could some one from dev team please look into this issue.

Thanks in advance..!!

Labels: -hasbisect Needs-Bisect
I'm guessing that bisect is wrong? The bug was reported against 58 and the bisect is pointing to 43. Re-adding the bisect label so we can try to get a good one.
Labels: Needs-Feedback
Rechecked the same as per comment#13, observed that the good & bad builds are correct.
Steps Followed:
--------------
1. Created 3 pdf files (extensions as .PDF, .PdF & .pdf ) & attached in the email
2. Download Acrobat reader
3. Tried to download .PDF file first.
4. PDF file gets downloaded but it won't opened automatically
5. Check(V) the option "Always open in acrobat reader" for the downloaded file
6. Now try to open .PdF extension file & observe .PdF file gets downloaded but it won't open automatically
7. Now try to open .PDF extension file & observe .PDF file gets downloaded but it won't open automatically
8. Now try to open .pdf extension file & observe .pdf file gets downloaded & opened automatically without any issue

Good behavior on 43.0.2327.0 build:
----------------------------------
1. All 3 pdf files (extensions as .PDF,.PdF & .pdf) files are getting downloaded & opened automatically without any issue

Bad behavior on 43.0.2328.0 build:
---------------------------------
1. Pdf files with .PDF & .PdF extension files are getting downloaded but won't open automatically until we select 'open' option
2. file with .pdf (small letters)extension gets downloaded & opened automatically without any issue

please find the attached screencasts for the same & let us know if we miss anything from our end.

Thanks in advance..!!

725891-Bad behavior.mp4
2.1 MB View Download
725891-Good behavior.mp4
3.6 MB View Download
Labels: -M-58 -M-60
Owner: qin...@chromium.org
Status: Assigned (was: Untriaged)
Labels: -Needs-Feedback -Needs-Bisect
Updating labels and removing from bisect bucket since TE already updated the findings.
Project Member

Comment 17 by bugdroid1@chromium.org, Aug 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e05b89097468ba30f4258bb0152ce4844280ed1

commit 8e05b89097468ba30f4258bb0152ce4844280ed1
Author: Min Qin <qinmin@chromium.org>
Date: Tue Aug 08 06:52:00 2017

Fix an issue that .PDF extension is not automatically opened by system viewer

We should make the comparison case insensitive.

BUG= 725891 

Change-Id: I6e50bc5d08eb55f0a7b0fbbac805a9d7ac453917
Reviewed-on: https://chromium-review.googlesource.com/596417
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492558}
[modify] https://crrev.com/8e05b89097468ba30f4258bb0152ce4844280ed1/chrome/browser/download/download_prefs.cc

Status: Fixed (was: Assigned)
Labels: Needs-Feedback
Tested this issue on Windows7, mac 10.12.6 & Ubuntu 14.04 using chrome latest Canary-62.0.3181.0 as per steps mentioned in Comment#14.

Observations:
------------
1. Different pdf files (.PDF,.Pdf,.pDf,.pdf) are getting downloaded & viewed successfully on Mac & Ubuntu with "Always open with system viewer" function for the first time.
2. On Windows, we have to download Acrobat reader software & select "Always open with Acrobat reader" option to open downloaded pdf file for the first time.

vnikolov@,
Please find the attached screencast for reference & confirm on the fix & expected behavior.

Thanks,

725891.mp4
2.2 MB View Download

Sign in to add a comment