Closed Bug 203344 Opened 21 years ago Closed 21 years ago

Small optimisation in nsJARChannel: prevents creation/deletion of ZipItem object

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: alfredkayser, Assigned: alfredkayser)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030414
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030414

Patch follows

Reproducible: Always

Steps to Reproduce:
Replace GetEntry with Available, no object creation/deletion,
just the content-length. As Available is here called directly 
after opening the stream the returned value is always the real content-length.
Attachment #121677 - Flags: superreview?(alecf)
Attachment #121677 - Flags: review?(darin)
Comment on attachment 121677 [details] [diff] [review]
Simple and easy patch

yup, i like it.  this prevents the JAR channel from having to deal directly
with nsIZipEntry :-)

r=darin
Attachment #121677 - Flags: review?(darin) → review+
over to alfred
Assignee: darin → alfredkayser
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 121677 [details] [diff] [review]
Simple and easy patch

sr=alecf

I wonder if this will allow us to stop #including nsIZipEntry somewhere.
Attachment #121677 - Flags: superreview?(alecf) → superreview+
Blocks: 203627
Created bug 203627 for nsIZipEntry removal investigation.

How to apply the patch? Do I need to request CVS access, and then
cvs it into the tree?
No longer blocks: 203627
Status: NEW → ASSIGNED
Blocks: 203627
I'll check this in when the tree opens today.
Checked in. Sorry it took me so long.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Quick question: this doesn't depend on uncompressed entries, like Java does?
No, this is about how to get the actual content length of the item,
and 'Available' just returns that (when called directly after opening).
OK, I only ask because Java's InflaterInputStream.available() doesn't always.
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: