[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] specifying the allowed character range for extension strings



On Fri, Jun 1, 2012 at 7:41 AM, Glenn Maynard <glenn@zewt.org> wrote:
> On Fri, Jun 1, 2012 at 7:05 AM, Benoit Jacob <bjacob@mozilla.com> wrote:
>>
>> I can't see anywhere in the spec mentioning this, but it seems clear that
>> extension strings must match
>>
>>  [a-zA-Z0-9_]+
>>
>> right? In particular they must be in the 7-bit ASCII range.
>
>
> Not really.  You should probably recommend that they be, either
> non-normatively or as a SHOULD, but I don't think there's any need to
> mandate it, since extensions are only added by implementations anyway.
>
>>
>> Do you agree that this should be mentioned in the spec in 5.14.14
>> "Detecting and enabling extensions" ?
>>
>> What should be the behavior of getExtension in presence of illegal
>> characters: generate INVALID_VALUE in addition to returning null?
>
>
> Just return with the same conditions as any other extension string with no
> match.  There's no point to adding another error path.
>
>> Notice that that isn't just an abstract issue as getExtension has to do a
>> case-insensitive comparison and so it has to do a nontrivial operation on
>> this input, so it is important to limit the allowed range of that input.
>
>
> That's not needed.  The usual approach is to not restrict the characters
> allowed, and define the comparison as being done in an "ASCII
> case-insensitive manner".
>  http://www.whatwg.org/specs/web-apps/current-work/#ascii-case-insensitive
> This allows specs to avoid having to worry about restricting the valid
> range, while still giving basic case-insensitivity.

Thanks for the suggestion. Updated 5.14.14 "Detecting and enabling
extensions"; please review.

-Ken

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------