Discussion:
[VM] Strange MIME handling
Uday Reddy
2011-03-24 23:40:00 UTC
Permalink
I ran into a strange case of MIME handling by VM today.

When VM can't find any way to display a particular MIME object, it calls
the handler for application/octet-stream as a last resort, which then
prompts for a file name and saves the attachment there.

I wonder why VM should save an attachment as part of a displaying
operation, while we can easily save it ourselves through a mouse-click
or $s if you prefer.

This behavior is not described in the manual either.

Does anybody know why VM saves the attachments in this way?

Cheers,
Uday
Göran Uddeborg
2011-03-25 14:00:12 UTC
Permalink
Post by Uday Reddy
When VM can't find any way to display a particular MIME object, it calls
the handler for application/octet-stream as a last resort, which then
prompts for a file name and saves the attachment there.
You mean automatically? That doesn't happen to me.

An application/octet-stream part of a message shows up as a "button".
If I click on it with button-2, or use "$ w", I get a prompt asking
for a file name. But by default it just sits there.

Did I misunderstand something?
John Hein
2011-03-25 14:59:11 UTC
Permalink
Post by Göran Uddeborg
Post by Uday Reddy
When VM can't find any way to display a particular MIME object, it calls
the handler for application/octet-stream as a last resort, which then
prompts for a file name and saves the attachment there.
You mean automatically? That doesn't happen to me.
An application/octet-stream part of a message shows up as a "button".
If I click on it with button-2, or use "$ w", I get a prompt asking
for a file name. But by default it just sits there.
Did I misunderstand something?
I've never noticed it in the wild either.

But Uday may be talking about the case where the mime object is not anything
known to vm (or not marked at all?), and it throws up its hands and decides to
use application/octet-stream - that is, not the case where it's already
marked as application/octet-stream to begin with.
Göran Uddeborg
2011-03-25 15:35:18 UTC
Permalink
Post by John Hein
But Uday may be talking about the case where the mime object is not anything
known to vm (or not marked at all?), and it throws up its hands and decides to
use application/octet-stream - that is, not the case where it's already
marked as application/octet-stream to begin with.
For me they behave the same. Both an attachment
application/octet-stream and an attachment random/stuff just sits
there, waiting for me if I want to do something with it. (The
"button" looks slightly different, but apart from that it is the
same.)
Uday S Reddy
2011-03-25 18:53:25 UTC
Permalink
I think I have figured it out. It was a bit of clever coding that has
come back to bite us. The same function is being used to display the
application/octet-stream button, and the action that fires when click
mouse-2 on it. In the case that I ran into, the action was getting
fired instead of the button creation.

I intend to separate the two things into separate functions.

Cheers,
Uday

Continue reading on narkive:
Loading...