(In reply to Honza Bambas (:mayhemer) from comment #2) > (In reply to Matt Woodrow (:mattwoodrow) from comment #1) > > * Get nsViewSourceChannel to conditionally implement nsIMultiPartChannel, and make it copy the values from the aRequest passed to OnStartRequest. > > This option seems better to me, we will mostly copy the existing pattern to make v-s channel just forward to the providing inner channel. This unfortunately doesn't work either :( We get multiple OnStartRequest calls cached by DocumentLoadListener, and they all have the same nsIRequest* value (the nsViewSourceChannel instance). Then when we pass them to HttpChannelParent and query for nsIMultiPartChannel::isLastPart they all they return (since the inner channel in nsViewSourceChannel is now the last part). I think we really need a unique nsIRequest* forwarded on for each part.
Bug 1612992 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Honza Bambas (:mayhemer) from comment #2) > (In reply to Matt Woodrow (:mattwoodrow) from comment #1) > > * Get nsViewSourceChannel to conditionally implement nsIMultiPartChannel, and make it copy the values from the aRequest passed to OnStartRequest. > > This option seems better to me, we will mostly copy the existing pattern to make v-s channel just forward to the providing inner channel. This unfortunately doesn't work either :( We get multiple OnStartRequest calls cached by DocumentLoadListener, and they all have the same nsIRequest* value (the nsViewSourceChannel instance). Then when we pass them to HttpChannelParent and query for nsIMultiPartChannel::isLastPart they all they return true (since the inner channel in nsViewSourceChannel is now the last part). I think we really need a unique nsIRequest* forwarded on for each part.