Skip to content

[api-minor] Support the Content-Disposition filename in the Firefox PDF Viewer (bug 1694556, PR 9379 follow-up) #13014

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

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Feb 24, 2021

As can be seen in the mozilla-central code, we're already getting the Content-Disposition filename. However, that data isn't passed through to the viewer nor to the PDFDataTransportStream-implementation, which explains why it's currently being ignored.

Please note: This will also require a small mozilla-central patch, see https://bugzilla.mozilla.org/show_bug.cgi?id=1694556, to forward the necessary data to the viewer.


r? @brendandahl

@Snuffleupagus Snuffleupagus force-pushed the Firefox-contentDispositionFilename branch 2 times, most recently from aefc0ce to 803c893 Compare February 24, 2021 13:14
@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/96bb0fb1e72ab57/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/527258a60842289/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/96bb0fb1e72ab57/output.txt

Total script time: 3.57 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/527258a60842289/output.txt

Total script time: 7.04 mins

  • Unit Tests: Passed

@Snuffleupagus Snuffleupagus force-pushed the Firefox-contentDispositionFilename branch 2 times, most recently from 0f85c42 to bbedcc7 Compare February 24, 2021 15:14
@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/4878fb45b384719/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

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

Total script time: 3.59 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/4878fb45b384719/output.txt

Total script time: 5.17 mins

  • Unit Tests: Passed

…DF Viewer (bug 1694556, PR 9379 follow-up)

As can be seen [in the mozilla-central code](https://searchfox.org/mozilla-central/rev/a6db3bd67367aa9ddd9505690cab09b47e65a762/toolkit/components/pdfjs/content/PdfStreamConverter.jsm#1222-1225), we're already getting the Content-Disposition filename. However, that data isn't passed through to the viewer nor to the `PDFDataTransportStream`-implementation, which explains why it's currently being ignored.

*Please note:* This will also require a small mozilla-central patch, see https://bugzilla.mozilla.org/show_bug.cgi?id=1694556, to forward the necessary data to the viewer.
@Snuffleupagus Snuffleupagus force-pushed the Firefox-contentDispositionFilename branch from 1c5b4e2 to 6fd899d Compare February 26, 2021 09:50
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/9a80d71e4eade32/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/bfe0524ccf8f9bb/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/9a80d71e4eade32/output.txt

Total script time: 3.55 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/bfe0524ccf8f9bb/output.txt

Total script time: 5.64 mins

  • Unit Tests: Passed

@brendandahl brendandahl merged commit 5dd749c into mozilla:master Feb 26, 2021
@Snuffleupagus Snuffleupagus deleted the Firefox-contentDispositionFilename branch February 26, 2021 16:04
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 10, 2021
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Mar 10, 2021
…. r=bdahl

*Please note:* This will require mozilla/pdf.js#13014 landing first.

Differential Revision: https://phabricator.services.mozilla.com/D106272

UltraBlame original commit: 3f23121524b1cee78069c8e0cc73a850ccd987c2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Mar 10, 2021
…. r=bdahl

*Please note:* This will require mozilla/pdf.js#13014 landing first.

Differential Revision: https://phabricator.services.mozilla.com/D106272

UltraBlame original commit: 3f23121524b1cee78069c8e0cc73a850ccd987c2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Mar 10, 2021
…. r=bdahl

*Please note:* This will require mozilla/pdf.js#13014 landing first.

Differential Revision: https://phabricator.services.mozilla.com/D106272

UltraBlame original commit: 3f23121524b1cee78069c8e0cc73a850ccd987c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants