Currently the nsIInterceptedChannel interface exposes a responseBody writable stream. When the channel is intercepted the synthesized body must be written to this stream. We are pretty much always reading from another stream, though, which means we always have a copying step during interception. Instead of copying to an output stream, we should change nsIInterceptedChannel to consume an nsIInputStream instead. It may internally copy for some configurations, but for others it can pass the stream on directly. In particular, we will have to continue to copy for non-e10s because of the way it uses a fake http cache entry. We must write into the entry. For e10s, though, we may be able to avoid any copying.
I'm going to end up doing this in bug 1204254.
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1204254
You need to log in before you can comment on or make changes to this bug.