Charles Lindsey | 22 Jan 22:33
Picon
Picon

RFC 2231 and CFWS


I want to understand exactly where FWS and comments may occur under RFC
2231 parameters, so that I may describe it correctly in Usefor.

In the following, '()' represents a position where whitespace, folding
or comments may occur (i.e. CFWS in RFC 2822 terminology).

So, prior to 2231, a parameter can be

    ()token()=()token()
or  ()token()=()"quoted-string"()

Under 2231, we can also have an asterisk, possibly followed by DIGITS,
between the token and the '='. So are they to be considerd as an
appendage to the token, or as a prependage to the "=" or, IOW, where may
I put () amongst them? RFC 2231 is not at all clear on this. The "worst
case" scenario would allow:

    ()token()*()0()=()........

Is that correct, and if not what is?

Also, I presume that the charset and language form can have () before
and after, but nowhere in the middle, as in

    ....=()us-ascii'en_US'foo%20bar()

Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131 Fax: +44 161 436 6133   Web: http://www.cs.man.ac.uk/~chl
Email: chl <at> clw.cs.man.ac.uk      Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
(Continue reading)

Keith Moore | 22 Jan 23:26
Picon

Re: RFC 2231 and CFWS


> So, prior to 2231, a parameter can be
> 
>     ()token()=()token()
> or  ()token()=()"quoted-string"()
> 
> Under 2231, we can also have an asterisk, possibly followed by DIGITS,
> between the token and the '='. So are they to be considerd as an
> appendage to the token, or as a prependage to the "=" or, IOW, where
> may I put () amongst them? 

they are part of the token that is the parameter name.  no, you may not
put comments in the middle of the parameter name.

> Also, I presume that the charset and language form can have () before
> and after, but nowhere in the middle, as in

nope, you cannot have white space in the middle of the parameter.

good questions though.

--

-- 
I tried enlightenment but it kept crashing.


Gmane