[imp] Problem downloading attachments with spaces in names(only with Netscape/Firebird)

Michael M Slusarz slusarz at bigworm.colorado.edu
Fri Oct 31 14:48:22 PST 2003


Quoting Tim Meader <tmeader at cne-odin.gsfc.nasa.gov>:

| Yes, this is a problem with the way in which IMP handles file
| attachments.
| I actually opened a bug in Mozilla (ie - Netscape 6+) about this. It
| seems
| that the Mozilla guys recently changed the way in which any Mozilla after
| 1.4 parses the "Content-xxxxxxx" headers. This isn't a Mozilla bug
| though,
| as the way they do it now is actually the way it should have been all
| along.

*sigh*  You have no idea how frustrating it is to have to deal with X number
of browsers that handle downloads X number of different ways.  IMP/Horde
actually does a better job of this than anything else, and I should know
because when I wrote the code I tried all the other available webmail
products and saw how they handled downloads (and none of them came even
close to correct behavior).

Ironically enough, I had to code extra for Mozilla browsers since they were
broken before, at least on Windows.  From lib/Browser.php:
    if ($this->getPlatform() == 'win') {
        $this->setQuirk('break_disposition_filename');
    }
http://bugzilla.mozilla.org/show_bug.cgi?id=172693

I have no idea if this is the same bug or not, but IMHO it is pretty much
impossible to keep up on the changes in browser handling unless you are a
developer of Mozilla.  :(

That being said, this *should* be easily correctable.  All we need is
someone to let us know exactly what versions of Mozilla work with the
current code, and what versions of Mozilla should use the new code.  Since
everything dealing with download headers is in a single function in
Browser.php, once we have the correct information, it will not be difficult
to fix.

For now, I have enclosed the filename in quotes when downloading Headers,
and hopefully this won't break other browsers.

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the imp mailing list