Closed Bug 789126 Opened 14 years ago Closed 8 years ago

Stream Data for Web Activity Content Handlers

Categories

(Firefox OS Graveyard :: Gaia::PDF Viewer, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:-)

RESOLVED WONTFIX
blocking-b2g -

People

(Reporter: bdahl, Unassigned)

Details

Background: In bug 776792 a new activity for application/pdf was added. This activity cancels the original pdf request and just passes the URL to the activity handler. As we've found out in FF integration, canceling the initial request can slow things down and it will break for PDF's that can't be re-requested and also for POST requests. Different Approach: The initial request should not be cancelled but the data should instead be streamed to the activity. We currently do something similar in FF by keeping the request in chrome and sending the data to pdf.js as it becomes available (see https://github.com/mozilla/pdf.js/blob/master/extensions/firefox/components/PdfStreamConverter.js#L140 ). To make this even more robust it would be good if the activity could view properties of the request and cancel the request if it wanted. Not a highly priority request, but if we're going to be doing all content handlers with web activities we should make them more robust.
Dropbox sends the custom headers X-RequestId and x-dropbox-request-id as well as cookies that don't get passed along with the web activity that prevents users from being able to identify themselves as authenticated users on FxOS.
blocking-b2g: --- → koi?
Nick What next steps are needed here?
Flags: needinfo?(nick)
Assignee: nobody → nick
We need a solution for opening pdf's using authenticated requests.
Assignee: nick → nobody
Flags: needinfo?(nick)
Brendan, Please check if this falls in your area of expertise.
Component: General → Gaia::PDF Viewer
Flags: needinfo?(bdahl)
My plate is rather full at the moment and there are other people better suited for this. We also need to first design the API.
Flags: needinfo?(bdahl)
blocking-b2g: koi? → -
We should wait with this until the platform has a byte stream primitive. No drafts yet unfortunately.
A temporary solution would be for PDFjs to support blobs in the web activity. Every other app, music and video, support blob *and* urls for viewing.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.