james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter M. Goldstein" <peter_m_goldst...@yahoo.com>
Subject RE: JavaMail mime header parsing
Date Fri, 01 Nov 2002 22:35:47 GMT

Serge,

I'm not sure that's the relevant RFC.  The type name/parameter pair is
not addressed in RFC 2045, since it's a parameter specific to the
multipart/related Content-Type.

That said, RFC 2387 which defines the Multipart/Related type, seems to
indicate that it's actually the unquoted version which is correct.
Check out section 3.4 of this RFC.  Although it also seems to say that,
in general, parameters will be quoted.

--Peter

> -----Original Message-----
> From: Serge Sozonoff [mailto:serge@globalbeach.com]
> Sent: Thursday, October 31, 2002 1:14 PM
> To: James Developers List
> Subject: JavaMail mime header parsing
> 
> Hi All,
> 
> Sorry for this slightly off topic subject, hoping someone has a simple
> answer.
> 
> My understanding of RFC2045 section 3.  MIME Header Fields leaves me
to
> beleive that both of the following representations are correct:
> 
> Content-Type: multipart/related;
> boundary=mmsc-mgw-unique-boundary-
> 1;type="application/smil";start="<89168876
> 9>"
> Content-Type: multipart/related;
> boundary=mmsc-mgw-unique-boundary-
> 1;type=application/smil;start=<891688769>
> 
> Note that one has some double quotes and one does not.
> 
> However when I run the non-quoted version through JavaMail 1.2 and 1.3
I
> get
> a ParseException or MessagingException depending on the operation I am
> doing.
> Is there a but in JavaMail or is my understanding of the RFC wrong?
> 
> Any thoughts on upgrading the JavaMail extension in James, I beleive
we
> are
> still using 1.2 (I have found no specific reason for suggesting this,
but
> there were some bug fixes and it might benefit those using JavaMail
for
> their mailets.
> 
> Thanks, Serge
> 
> Example code to see this in action
> 
> import javax.mail.internet.*;
> 
> class test {
>     public static void main(String[] args) {
>         try {
>             String header = "multipart/related;
> boundary=mmsc-mgw-unique-boundary-
> 1;type=application/smil;start=<891688769>"
> ;
>             ContentType cType = new ContentType(header);
>             System.out.println(cType.toString());
>         } catch(ParseException pe) {
>             System.out.println("Parse error");
>             pe.getMessage();
>         }
>     }
> }
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:james-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:james-dev-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message