The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

Corrupt filename when posting to a newsgroup

Forums » Opera for Windows/Mac/Linux » Opera mail, chat and news

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

11. November 2011, 01:41:18

hucker

Posts: 1416

Corrupt filename when posting to a newsgroup

Content-Disposition: attachment; filename="no profit.jpg"
Content-Type: image/jpeg; name==??Q?no=20profit.jpg?=
Content-Transfer-Encoding: Base64

What on earth happened here?

Opera could read the resultant post, but someone using an inferior newsreader (Xnews) could not. It stupidly read the corrupt name instead of the good one.
16 parrots and reproducing fast!
http://www.petersparrots.com

11. November 2011, 01:50:26

burnout426

Posts: 13202

Originally posted by hucker:

Content-Type: image/jpeg; name==??Q?no=20profit.jpg?=



Opera does some tricks like Thunderbird to make it so Outlook users don't see corrupted filenames when a filename is really long and or contains non-ascii characters.

The problem is that Opera didn't copy Thunderbird's behavior correctly and enables the trick even for simple filenames like "no profile.jpg". This causes some crappy clients (like Lotus) to get confused.

The reason most clients don't have a problem with it is they use filename= in the content-disposition header or they understand quoted-printable in name= in the content-type header.

I've been trying to get the bug fixed for a while now, but no luck.

11. November 2011, 01:55:57

hucker

Posts: 1416

Looks more like Xnews's fault to me.
16 parrots and reproducing fast!
http://www.petersparrots.com

11. November 2011, 02:24:05

burnout426

Posts: 13202

Originally posted by hucker:

Looks more like Xnews's fault to me.



It is. But, if Opera's behavior was like Thunderbird's, it'd work. The bug is DSK-350183 btw.

11. November 2011, 02:30:07

hucker

Posts: 1416

Explain what the exact difference is between Opera's behaviour and Thunderbird's if you can please.
16 parrots and reproducing fast!
http://www.petersparrots.com

11. November 2011, 02:41:23

burnout426

Posts: 13202

Originally posted by hucker:

Content-Type: image/jpeg; name==??Q?no=20profit.jpg?=



Thunderbird would do:

Content-Type: image/jpeg; name="no profit.jpg"

11. November 2011, 02:44:13

hucker

Posts: 1416

Yes, but I meant when DOES Thunderbird use the "trick" and doesn't that impede crappy newsreaders too?
16 parrots and reproducing fast!
http://www.petersparrots.com

11. November 2011, 03:20:52

burnout426

Posts: 13202

Example:

"√Fee App - Final Order.doc":

Thunderbird and Opera do this:
Content-Type: text/plain; name="=?UTF-8?B?4oiaRmVlIEFwcCAtIEZpbmFsIE9yZGVyLmRvYw==?=" 

(Only Opera uses the correct application/msword mime type and doesn't quote the name value (as it's not really needed when it's encoded)).

, which most crappy clients seem to have no trouble with, and it makes Outlook and Outlook Express happy (they don't support RFC2231). Can't vouch for xnews though.

It's just the case where the filename doesn't have an non-ascii characters in it that Opera encodes it. But, it's not so much that Opera encodes it in that situation, it's that it uses quoted-printable instead of base64 (note the 'B' v.s. the 'Q').

Forums » Opera for Windows/Mac/Linux » Opera mail, chat and news