Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode URL encoded filenames from content disposition headers #11019

Merged
merged 1 commit into from
Jul 31, 2019
Merged

Decode URL encoded filenames from content disposition headers #11019

merged 1 commit into from
Jul 31, 2019

Conversation

wangsongyan
Copy link
Contributor

pdf.js cannot correctly display urlencode contentDispositionFilename, so I add the decode logic of contentDispositionFilename in extractFilenameFromHeader.

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Jul 30, 2019

First of all, this needs a better and more readable commit message than just "support urlencode contentDispositionFilename", since it's a bit difficult to decipher when looking at only the commit message (e.g. at the git command line) and not the code itself.
Second of all, please make sure to follow https://github.com/mozilla/pdf.js/wiki/Squashing-Commits.

Edit: Looks like a replacement for PR #10381.

@wangsongyan wangsongyan changed the title support urlencode contentDispositionFilename decode filename when match an urlencode filename from contentDispositionFilename Jul 30, 2019
@timvandermeij
Copy link
Contributor

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/fb59e1390fa69ef/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://54.215.176.217:8877/598b77df2dd7ca6/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/fb59e1390fa69ef/output.txt

Total script time: 2.67 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/598b77df2dd7ca6/output.txt

Total script time: 5.33 mins

  • Unit Tests: Passed

@timvandermeij timvandermeij merged commit c5d837d into mozilla:master Jul 31, 2019
@timvandermeij
Copy link
Contributor

Thank you for improving this!

@timvandermeij timvandermeij changed the title decode filename when match an urlencode filename from contentDispositionFilename Decode URL encoded filenames from content disposition headers Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants