Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Issue 2334163003: Fix an issue when parsing extension from file name with white spaces (Closed)

Created:
4 years, 3 months ago by qinmin
Modified:
4 years, 3 months ago
Reviewers:
gone
CC:
chromium-reviews, asanka
Target Ref:
refs/pending/branch-heads/2840
Project:
chromium
Visibility:
Public.

Description

Fix an issue when parsing extension from file name with white spaces MimeTypeMap.getFileExtensionFromUrl() only works for encoded urls. As a result, white space is not supported. However, file name may contain white spaces. This causes the method to return empty extensions. Convert file name to encoded strings doesn't work directly. For instance, URLEncoder.encode() converts white space to "+" instead of "%20". So this change just extract the extension from file name directly. TBR=dfalcantara@chromium.org BUG=637917 Review-Url: https://codereview.chromium.org/2338593002 Cr-Commit-Position: refs/heads/master@{#418130} (cherry picked from commit 23ad64c72dc2f116a7b73c2d6803f449ebba2553) Committed: https://chromium.googlesource.com/chromium/src/+/95f4ea1eea72472d729b1eed1da19d5505d2535a

Patch Set 1 #

Messages

Total messages: 2 (1 generated)
qinmin
4 years, 3 months ago (2016-09-13 18:31:57 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
95f4ea1eea72472d729b1eed1da19d5505d2535a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698