Gnus development mailing list
 help / color / mirror / Atom feed
* Parsing Content-Type with repeated attributes
@ 2010-10-11 12:11 David Engster
  2010-10-11 18:21 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: David Engster @ 2010-10-11 12:11 UTC (permalink / raw)
  To: ding

I just got a mail with the following Content-Type:

Content-Type: application/x-pkcs7-mime;smime-type=signed-data;name=smime.p7m; smime-type=signed-data; name="smime.p7m"

This belongs to a base64 encoded mail with S/MIME signing. Now, this
Content-Type was obviously produced by some strange mail software
(*cough* X-MimeOLE: Produced By Microsoft Exchange V6.5 *cough*), but
when you run that Content-Type through `rfc2231-parse-qp-string', it
produces

("content-type:application/x-pkcs7-mime"
 (name . "smime.p7msmime.p7m")
 (smime-type . "signed-datasigned-data"))

I first thought this was a bug, but it seems the above rfc2231 function
concats those strings very deliberately... Gnus also actually tries to
verify the mail, but with the old mm-view-pkcs7-verify and I'm using EPG
with gpgsm.

-David



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Parsing Content-Type with repeated attributes
  2010-10-11 12:11 Parsing Content-Type with repeated attributes David Engster
@ 2010-10-11 18:21 ` Lars Magne Ingebrigtsen
  2010-10-12 18:51   ` David Engster
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-11 18:21 UTC (permalink / raw)
  To: ding

David Engster <deng@randomsample.de> writes:

> ("content-type:application/x-pkcs7-mime"
>  (name . "smime.p7msmime.p7m")
>  (smime-type . "signed-datasigned-data"))
>
> I first thought this was a bug, but it seems the above rfc2231 function
> concats those strings very deliberately...

I dimly seem to remember that being specified by the RFC.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Parsing Content-Type with repeated attributes
  2010-10-11 18:21 ` Lars Magne Ingebrigtsen
@ 2010-10-12 18:51   ` David Engster
  2010-10-12 21:33     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: David Engster @ 2010-10-12 18:51 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen writes:
> David Engster <deng@randomsample.de> writes:
>
>> ("content-type:application/x-pkcs7-mime"
>>  (name . "smime.p7msmime.p7m")
>>  (smime-type . "signed-datasigned-data"))
>>
>> I first thought this was a bug, but it seems the above rfc2231 function
>> concats those strings very deliberately...
>
> I dimly seem to remember that being specified by the RFC.

OK, I've read (well, rather skimmed) the RFC, and it defines a
continuation of MIME parameters through the asterisk, followed by a
number:

URL*0="ftp://";
URL*1="cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar"

Otherwise, I don't see that you should concatenate parameter
values. Actually, I couldn't find any specification of what should be
done when parameters are defined several times.

-David



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Parsing Content-Type with repeated attributes
  2010-10-12 18:51   ` David Engster
@ 2010-10-12 21:33     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-12 21:33 UTC (permalink / raw)
  To: ding

David Engster <deng@randomsample.de> writes:

> OK, I've read (well, rather skimmed) the RFC, and it defines a
> continuation of MIME parameters through the asterisk, followed by a
> number:
>
> URL*0="ftp://";
> URL*1="cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar"
>
> Otherwise, I don't see that you should concatenate parameter
> values. Actually, I couldn't find any specification of what should be
> done when parameters are defined several times.

It seems wrong to concatenate them, anyway.  I've now made the code
ignore any repetitions.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-12 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-11 12:11 Parsing Content-Type with repeated attributes David Engster
2010-10-11 18:21 ` Lars Magne Ingebrigtsen
2010-10-12 18:51   ` David Engster
2010-10-12 21:33     ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).