Closed Bug 21250 Opened 25 years ago Closed 25 years ago

Need to implement stream-as-file service

Categories

(Core :: Networking: Cache, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: fur, Assigned: davidm)

References

Details

(Whiteboard: 1d)

Attachments

(3 files)

I've defined an interface to be used by those components that require stream-as-file semantics, i.e. the 'jar:' protocol handler and the classic browser plug-in API. See: http://lxr.mozilla.org/seamonkey/source/netwerk/cache/public/nsIStreamAsFile.idl The cache manager already implements this interface (with some caveats - see below). In an ideal world, I think each protocol handler would be able to handle the nsIChannel::CACHE_AS_FILE flag and, via some Open, hand back an instance of nsIStreamAsFile. This would limit knowledge of whether or not a URI refers to a local file within each protocol handler. However, I don't think this will happen any time soon, so I'm proposing a subroutine that reads from a URL and stores the result in the cache. (See attachment.) I think this method should live in nsIIOService since it will be needed by multiple callers.
I said there were some caveats about the cache manager implementing nsIStreamAsFile. First, I've never tested that portion of the cache manager and it may need some debugging. Second, looking over the code, I found one problem. (Patch attached). I'll need you to check this in for me once the tree opens.
Status: NEW → ASSIGNED
Bulk move of all Cache (to be deleted component) bugs to new Networking: Cache component.
Blocks: 22176
Target Milestone: M14
Blocks: 24765
Depends on implementing the disk cache. Davidm says that there's code there for stream-as-file, but it's not hooked up to the protocols yet, and hasn't been tested.
Depends on: 21100
Blocks: 27763
This bug blocks bug 27763, which is beta1 PDT+, so I'm nominating this bug for beta1 review as well.
Keywords: beta1
Note: if PDT team assigns a fix cut-off date to this bug, for consistency, it shouldn't be earlier than the fix cut-off date for bug 27763, which is beta1 PDT+.
However, as I said in bug 27763, Stanley is working on an alternative solution that doesn't involve stream-as-file.
Putting on PDT-. We really want java and hope that stanleys work if fruitful
Whiteboard: [PDT-]
Reassigning to davidm. Marking beta2.
Keywords: beta2
reassigning
Assignee: gayatrib → davidm
Status: ASSIGNED → NEW
David, can you please post a status update here? Thanks,
Moving to M15.
Target Milestone: M14 → M15
Moving what's not done for M15 to M16.
Target Milestone: M15 → M16
Keywords: beta1
Whiteboard: [PDT-] → 1d
Keywords: nsbeta2
Need to know the latest input on this...is there more needed here than protocol handler and the classic browser plug-in support? What is still the blocker for beta2?
Whiteboard: 1d → [NEED INFO]1d
Not needed for nsbeta2 since this is only for downloaded jar files.
Keywords: nsbeta2
Whiteboard: [NEED INFO]1d → 1d
This does not only affect jar file support - it's needed by legacy plugins also. See http://bugzilla.mozilla.org/show_bug.cgi?id=27763 and http://bugzilla.mozilla.org/show_bug.cgi?id=23667
You're right. Marking nsbeta2 again.
Keywords: nsbeta2
checked in code. I tested it using a version of testprotocols. If anyone knows of any code to exercise stream as file using mozilla let me know.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Don't the audio plugins do this (e.g. RealAudio)? Ask amusil or av.
The plugin glue code at http://lxr.mozilla.org/seamonkey/source/modules/plugin/nglsrc/nsPluginHostImpl.c pp doesn't use the cache yet, so you won't be able to exercise stream as file using a plugin yet.
No longer blocks: 22176
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: