[JDEV] A piece of MIME?
Scott Robinson
scott at tranzoa.com
Tue Aug 10 17:30:20 CDT 1999
Attached is a exerpt from my MIME document. It's still very raw, but I
believe the concepts are understandable. It is horribly full of useless
comments. CHEW ON THIS!
It is also available at:
http://dsn.itgo.com/example.mime
Scott.
-------------- next part --------------
<?xml version="1.0"?>
<jabber version="name/os version/version" protocol="934242200">
<login>
<user>scott</user>
<pass>discwasher</pass>
<nick>Quad</nick>
</login>
<-- We still leave support for "simple" messaging. -->
<message>
<to>jeremie</to>
<say>test</say>
</message>
<-- Here is an example for MIME -->
<-- Notice the modifications the <message> tag? A server should only _parse_
empties (like above) and message/jabber's. There may be mod's for other
message types later. -->
<-- I've also added a few tags: <date>, <bcc> -->
<message type="message/jabber" length=2382>
<to>jeremie</to>
<to name='Richard Stallman(On Mountain)'>rms at gnu.org</to>
<to name='DSN Network Administration'>root at dsn.net</to>
<bcc>billg at microsoft.com</bcc>
<thread>World domination</thread>
<priority>1</priority>
<subject>This Linux Fad...</subject>
<date>Tue, 10 Aug 1999 15:16:54 -0700</date>
<-- A normal MIME "mailer" would ignore this equivalent. We should,
of course, pay attention to it. Add it to a "description"
or something... but we should standardize on it being the
first. Or at least have a tag. <say description>? -->
<-- How are we handling whitespace anyway? -->
<-- I don't have the put the length because there is no chance of a
conflict. What would happen if some evil user put the text
"</say></message>" in their plain-text message? What if
somewhere it isn't escaped properly? -->
<say type="text/plain">This Linux fad is _killing_ us.
rms, didn't we tell you to handle these weirdos?
They seem to be worshipping you as the free software god!
See if you can gain over this Linus character in the polls.
This is a MIME-encoded message. If your Jabber client cannot
understand MIME, ClientOfChoiceWithNoSpaces is a working
alternative.
</say>
<say type="text/html" encoding="utf-16" length=610>
<HTML>
<BODY>
<CENTER>This Linux fad is <ITALIC>killing</ITALIC> us.</CENTER>
<P>
<A HREF="mailto: rms at gnu.org">rms</A>, didn't we tell you
to handle these weirdos? They seem to be worshipping you as
the <A HREF="http://www.gnu.org/">free software</A> god!
See if you can gain over this <A
HREF="http://www.lrz-muenchen.de/~ui161ab/www/Pinguin/pengo.jpg">
Linus</A> character in the polls.
</BODY>
</HTML>
</say>
<say type="message/jabber" length=218>
<message>
<to>scott</to>
<subject>Look at this URL!</subject>
<say>http://www.linux.com/</say>
</message>
</say>
</message>
</jabber>
More information about the JDev
mailing list