Subject: Attaching html files.

From: Brian Salter-Duke <[email-masked]>
Date: Sun, 25 Jul 1999 15:46:29 +1100

In the archives for earlier this month there is a discussion about
attaching html files which came out as text/plain not text/html. It
ended when the original author said that pine -d 9 had showed him
that it was reading the wrong .mime.types file. I think it is a
real problem. Here is a bit out of the debug file:-

It searches down my .mime.types file until-

traverse: buffer="image/x-xwindowdump            xwd             "
typespec="image/x-xwindowdump"
traverse: trying ext "xwd"
traverse: buffer="text/html                      html            "
typespec="text/html"
traverse: trying ext "html"
traverse: type=text, subtype=html.
busy_alarm(1, Busy, 0, 0)
cancel_busy_alarm(-1)
q_status_message(File /home/ruth/index.html attached as t)
fix_windsize()
new win size -----<24 80>------
output_message(File /home/ruth/index.html attached as type TEXT/PLAIN)
STATUS cmd:120, max:3, min0

This tells me that it found it was text/html but then promptly ignored
this and made it text/plain. Is this correct? It certainly gets attached
as text/plain. 

It seems to me that this accurs for all text files. E.g. I have 
"application/msword doc" in .mime.types. A proper MSWord *.doc
file gets sent as application/msword, but a text file I just rename as
*.doc gets sent as text/plain.

Is there a way for forcing .mime.types file behaviour and no other
behaviour? The guessing of behaviour is fine if the user has no 
.mime.types file, but is otherwise unacceptable.

Cheers, Brian.
-- 
        Associate Professor Brian Salter-Duke (Brian Duke)
Chemistry, Faculty of Science, IT and Education, Northern Territory University,
  Darwin, NT 0909, Australia.  Phone 08-89466702. Fax 08-89466847
[email-masked]  http://www.smps.ntu.edu.au/chemistry/compchem.html
-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: "Srikanth V. Vallabhaneni" <[email-masked]>
Date: Sun, 25 Jul 1999 17:07:02 +0530 (IST)

Brian,

I faced a similar problem with the attachments but then it turned out 
that my mimetype-search-path wasn't properly set. I suspect you've the
same problem. Here's a bit out of my debug file:

Debug output of the Pine program (debug=9 debug_imap=4). Version 4.10
Sun Jul 25 14:19:13 1999

<snip>

mt_get_file_ext : filename="/users/vvsri/index.html", extension="html"
- mt_srch_mime_type -
mime_types: path: /users/vvsri/mime.types
traverse: buffer="TEXT/HTML    html htm"
typespec="TEXT/HTML"
traverse: trying ext "html"
traverse: type=TEXT, subtype=HTML.
q_status_message(File /users/vvsri/index.html attach)
fix_windsize()
new win size -----<24 80>------
output_message(File /users/vvsri/index.html attached as type TEXT/HTML)
STATUS cmd:120, max:3, min0

<snip>

Note the mime_types:path field. I don't see that specified in your debug
output (or has been deleted). So, make sure you have it right. If you
have specified the mimetype-search-path, then pine will look up the
mime.types file (or whatever filename's been specified at the path) and
treat the attachment accordingly.

This is what I have in my mime-types file:
TEXT/HTML    html htm
IMAGE/GIF    gif
IMAGE/JPEG   jpeg jpg

Hope this helps..

-Srikanth

---

From: Brian Salter-Duke <[email-masked]>
Date: Mon, 26 Jul 1999 12:05:02 +1100

Hi Srikanth,

Thank you for your help, but I do not believe it is the answer. See below.

> traverse: type=TEXT, subtype=HTML.

You have TEXT/HTML as the first entry in mime.types so it finds it
straight away. My situation is slightly different.

> treat the attachment accordingly.

My mime.types file is quite long and it is specified in the debug file
alomg with its search through it.
 
> > It searches down my .mime.types file until-

It searches through many entries in mime.types so I deleted everything
down to the one before text/html.

> > traverse: type=text, subtype=html.

OK. It has found the html extension as text/html.

> > q_status_message(File /home/ruth/index.html attached as t)

The t at the end may be the problem. For one it gets right such as
postscript there is txt in place of t.

> > output_message(File /home/ruth/index.html attached as type TEXT/PLAIN)

Here it ignores what it found and uses text/plain. I think there is a 
problem here and it is not that it can not find my mime.types file.

Cheers, Brian.