Closed Bug 77850 Opened 23 years ago Closed 22 years ago

data:audio/mp3;base64 doesn't download correctly

Categories

(Core :: Networking, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.1alpha

People

(Reporter: ian, Assigned: bzbarsky)

References

()

Details

(Keywords: testcase, Whiteboard: [Hixie-P2] want for mozilla 0.9.1)

Attachments

(1 file)

STEPS TO REPRODUCE
   1. Visit http://hixie.ch/tests/adhoc/data/001.html
   2. Download the sound file that the link points to.
   3. Listen to it.

ACTUAL RESULTS
   The download results in a broken 4 character file instead of the 10002 byte
   audio stream that was expected.

EXPECTED RESULTS
   "The hats were my idea!"
Amazingly enough, the URL field for this bug also points to the same sound file.
So you can use that instead of my test file.
Keywords: mozilla1.0, testcase
Whiteboard: [Hixie-P2]
-->law
Assignee: neeti → law
I need help from Networking on this one.

No matter how I try to process this data: url, I get only 4 bytes of data.  
This happens whether I click on the link (the data then arrives at 
nsExtAppHandler::OnDataAvailable), or, right-click on choose "save link as" 
(the data then arrives at nsStreamXferOp::OnDataAvailable).  In both cases, 
there's only 4 bytes of data.  This may be due to something in nsDataChannel, 
or it may be due to something funky happening to the URI along the way.

In the former case, it's a Networking problem.  In the latter, they're going to 
have to tell us how to avoid this (note that it happens in two separate code 
paths, so it must be kind of tricky).

I'm sending back to Neeti.  Can you look at nsDataChannel::AsychOpen and figure 
out why streamLen is always 4 for this URL, please?  Thanks.
Assignee: law → neeti
Target Milestone: --- → mozilla0.9.2
Summary: data:audio/mp3 doesn't download correctly → data:audio/mp3;base64 doesn't download correctly
What's going on with this bug?
Whiteboard: [Hixie-P2] → [Hixie-P2] want for mozilla 0.9.1
Bill: I applied the patch from bug 
http://bugzilla.mozilla.org/show_bug.cgi?id=78876 locally to my tree. We now the 
get correct number of bytes (10002) in streamlen in 
nsDataChannel::AsynchOpen(..), instead of 4. 

However, we still have have problems downloading the file, when we use the "save 
this file to Disk" option in the Downloading dialog.

I am still keeping this bug open, instead of closing this one and opening a new 
bug, because this bug is about not downloading the file correctly and problem 
still exists even with the patch applied. Feel free to do otherwise.

Over to you to investigate this further..
Assignee: neeti → law
Depends on: 78876
No longer depends on: 78876
Depends on: 78876
OK, thanks.  I will apply that patch and figure out what's going wrong with the
download.
*** Bug 81190 has been marked as a duplicate of this bug. ***
mass move, v2.
qa to me.
QA Contact: tever → benc
nav triage team:

marking nsbeta1+, p3, and mozilla0.9.3
Keywords: nsbeta1+
Priority: -- → P3
Target Milestone: mozilla0.9.2 → mozilla0.9.3
-> alecf for investigation. it would be nice to reassess this bug and see if we 
can have for Netscape rtm. 
Assignee: law → alecf
Keywords: nsBranch
well, data: isn't an officially supported schema, to the best of my
knowledge...but I'll take a look.
<data:> is defined in RFC 2397. Status is "Proposed Standard".
I'm pretty sure this is a uriloader or MIME thing. I just tried this on the
branch build, and nothing happens. I'm reassigning to mscott for now, but
staying on the CC in case I can figure out a good workaround.
Assignee: alecf → mscott
I don't believe this is a nsbranch quality bug. I wouldn't take it in a limbo
build. removing the nsbranch keyword. 
Keywords: nsBranch
I agree actually :)
this appearantly got the nsbranch keyword because the triage team just
misunderstood and thought it meant that no mp3 links worked at all.
triaging.
Target Milestone: mozilla0.9.3 → mozilla1.0
OS: Windows 2000 → All
Hardware: PC → All
Blocks: 115101
Target Milestone: mozilla1.0 → mozilla1.2
Keywords: helpwanted
So..  The "URL" field of this bug is truncated to 255 chars and thus does not
work.  The base64 decoding fails, throws an error, this error is propagated up
to nsDocShell::LoadURI which throws it... and somewhere something ends up
ignoring the load failure (I think that notification of errors in loadURI is
disabled because of too many false positives or something....)

The URL at http://hixie.ch/tests/adhoc/data/001.htm works once this patch is
applied.
Comment on attachment 79725 [details] [diff] [review]
Not all nsIURIs are nsIURLs

r=law
Attachment #79725 - Flags: review+
To me, since I have a fix in any case...
Assignee: mscott → bzbarsky
Keywords: helpwanted
Priority: P3 → P1
Target Milestone: mozilla1.2alpha → mozilla1.1alpha
Comment on attachment 79725 [details] [diff] [review]
Not all nsIURIs are nsIURLs

sr=darin, though i'm not sure how fname and mSourcePath will be used.  does it
make sense for the path of a data URI to be used like this?
Attachment #79725 - Flags: superreview+
They're used to say where the data is coming from (and cropped in the process if
needed).

Fixed on trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Build: 2002-10-22-08-trunk

File is downloaded as 10002 byte file.  mp3 files plays seemingly just fine.

Marking Verified!
Status: RESOLVED → VERIFIED
QA Contact: benc → jimmylee
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: