nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] mhbuild Content-Disposition header

2006-02-02 21:59:00
I was afraid of that.

How about using {} to encapsulate the -disposition parameters:

  directive ::= "#" type "/" subtype
                    0*(";" attribute "=" value)
                    [ "(" comment ")" ]
                    [ "<" id ">" ]
                    [ "{" disposition-type 0*(";" attribute "=" value) "}" ]
                    [ "[" description "]" ]
                    [ filename ]
                    EOL

E.g.,

  #application/pdf <>{attachment; filename="foo.pdf"}[Adobe PDF v1.3] foo.pdf

This is no longer very easy to implement :-/

My feeling is that a delimited string might not be appropriate for this
because content-disposition has an internal grammar, unlike comments,
ids, and descriptions.

Perhaps something like what mhbuild does with Content-Description in
plaintext is appropriate, i.e. if a Content-Disposition line follows
immediately after a directive it is treated as a header for that MIME
entity. In fact, what might be even clearer is if the Content-Disposition
line is escaped with a #, because then if it's divorced from a directive
mhbuild will treat it as an error. In fact, this might be a way to
do all MIME extension fields. The grammar then becomes

            directive    ::=     "#" type "/" subtype
                                     0*(";" attribute "=" value)
                                     [ "(" comment ")" ]
                                     [ "<" id ">" ]
                                     [ "[" description "]" ]
                                     [ filename ]
                                     EOL
                                     [ "#" extension-field ]

where extension-field just can't look like a directive.

Cheers,

        - Joel


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>