Closed Bug 281648 Opened 20 years ago Closed 20 years ago

"Download Link Target" results in bad download for large MP3 file.

Categories

(Camino Graveyard :: Downloading, defect)

PowerPC
All
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
Camino0.9

People

(Reporter: mikepinkerton, Assigned: sfraser_bugs)

References

()

Details

Attachments

(1 file, 1 obsolete file)

from user feedback:

go to
http://www.boardgamegeek.com/geekjournal.php3?action=viewcomments&journalid=6383
and download either of the split MP3s (using Download Link Target)

expected:
- once its on the desktop, it should open fine

actual:
- doesn't open in iTunes, though it appears to have the correct size in the
finder. report says it works in firefox.
Target Milestone: --- → Camino0.9
I think this depends on whether you use 'Download link target' or just click on
the MP3 link. 'Download link target' gives me a bad file, but clicking on the
link gives me a working file.
Summary: Large downloaded MP3 files don't open → "Download Link Target" results in bad download for large MP3 file.
upping the priority
Severity: normal → major
Here are the HTTP headers for the download:
HTTP/1.1 200 OK
Date: Sat, 26 Feb 2005 22:33:19 GMT
Server: Apache/2.0.52 (Fedora)
Last-Modified: Wed, 02 Feb 2005 06:03:20 GMT
ETag: "3dc00d-21f5030-3ef1b01979a00"
Accept-Ranges: bytes
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Connection: close
Transfer-Encoding: chunked
Content-Type: audio/mp3


I think the stream is gzipped, but we're not unzipping on the way down.
Yup, I zcat even a partially downloaded file to get something playable.
Assignee: pinkerton → sfraser_bugs
This patch fixes the bug by only setting the PERSIST_FLAGS_NO_CONVERSION flag
if  nsIExternalHelperAppService::ApplyDecodingForExtension() says we should not
decode (it just looks at the file extension to see if its .zip, .gz etc). This
is what the JS in moz/ff does.

Also null out mPersist when we're done with it.
Attachment #175670 - Flags: review?(pinkerton)
Comment on attachment 175670 [details] [diff] [review]
Patch: consult nsIExternalHelperAppService before setting PERSIST_FLAGS_NO_CONVERSION

This seems right to me, sr=darin
Attachment #175670 - Flags: superreview+
Maybe we should use PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION...
Status: NEW → ASSIGNED
darin - could you comment on smfr's suggestion?
(In reply to comment #7)
> Maybe we should use PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION...

can you explain why?  i'm open to whatever... just motivate the change :)
> can you explain why

Because someone mentioned that this functionality had been rolled into
nsWebBrowserPersist (based on that flag).
Attached patch Simpler patchSplinter Review
Attachment #175670 - Attachment is obsolete: true
Attachment #176098 - Flags: superreview?(darin)
this should also go on the 083 branch. it's been around for a while. 
Blocks: 279168
r=pink, but just curious if this will cause other unintended side effects to
suddenly start doing conversion on things.
Attachment #176098 - Flags: superreview?(darin) → superreview?(pinkerton)
Comment on attachment 176098 [details] [diff] [review]
Simpler patch

sr=pink

also fixes the bug where you save the html at www.google.com and instead of
saving html we'd get garbage (the gzip'd contentes).
Attachment #176098 - Flags: superreview?(pinkerton) → superreview+
Attachment #175670 - Flags: review?(pinkerton)
landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
which of these patches is ok for the 176branch? darin?
"simpler patch" won't compile on the 1.7 branch; that flag is trunk-only.
that's what i figured. so is the previous patch ok for branch checkin?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: