WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
169060
[WK2][!NETWORK_SESSION] Failure to download when using a download attribute with no value on an anchor
https://bugs.webkit.org/show_bug.cgi?id=169060
Summary
[WK2][!NETWORK_SESSION] Failure to download when using a download attribute w...
Chris Dumez
Reported
2017-03-01 14:38:27 PST
Failure to download when using a download attribute with no value on an anchor.
Attachments
Patch
(4.47 KB, patch)
2017-03-01 14:49 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(6.15 KB, patch)
2017-03-01 15:31 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(9.79 KB, patch)
2017-03-01 16:00 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-03-01 14:38:56 PST
<
rdar://problem/30773140
>
Chris Dumez
Comment 2
2017-03-01 14:49:31 PST
Created
attachment 303127
[details]
Patch
Darin Adler
Comment 3
2017-03-01 15:00:58 PST
Comment on
attachment 303127
[details]
Patch What about a download attribute with a value that consists entirely of whitespace? Many properties like this one strip leading and trailing HTML spaces; does this one do that?
Darin Adler
Comment 4
2017-03-01 15:01:22 PST
Comment on
attachment 303127
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303127&action=review
> Source/WebKit2/ChangeLog:11 > + up passing an empty string as suggested filename to Safari which is ot handled properly.
ot -> not
Darin Adler
Comment 5
2017-03-01 15:02:03 PST
Comment on
attachment 303127
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303127&action=review
> Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp:204 > + String suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(m_suggestedFilename.isEmpty() ? filename : m_suggestedFilename, mimeType);
Might also want to change the code so it never sets m_suggestedFilename to an empty string.
Chris Dumez
Comment 6
2017-03-01 15:07:53 PST
(In reply to
comment #3
)
> Comment on
attachment 303127
[details]
> Patch > > What about a download attribute with a value that consists entirely of > whitespace? Many properties like this one strip leading and trailing HTML > spaces; does this one do that?
We do not strip spaces: - Safari: creates a file with only whitespaces in the name - Firefox: creates a file with only whitespaces in the name - Chrome: creates a file with name "- -.jpeg" (i.e. sanitizes so first and last character cannot be whitespace)
Chris Dumez
Comment 7
2017-03-01 15:31:39 PST
Created
attachment 303133
[details]
Patch
Chris Dumez
Comment 8
2017-03-01 15:32:54 PST
(In reply to
comment #5
)
> Comment on
attachment 303127
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=303127&action=review
> > > Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp:204 > > + String suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(m_suggestedFilename.isEmpty() ? filename : m_suggestedFilename, mimeType); > > Might also want to change the code so it never sets m_suggestedFilename to > an empty string.
Done in the latest iteration. Requesting review again because of this extra change.
Chris Dumez
Comment 9
2017-03-01 16:00:36 PST
Created
attachment 303139
[details]
Patch
Chris Dumez
Comment 10
2017-03-01 16:27:24 PST
Comment on
attachment 303139
[details]
Patch Clearing flags on attachment: 303139 Committed
r213253
: <
http://trac.webkit.org/changeset/213253
>
Chris Dumez
Comment 11
2017-03-01 16:27:31 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug