Re: New Version Notification for draft-ietf-httpbis-header-structure-03.txt

On 2 Feb 2018, at 3:24 pm, Matthew Kerwin <matthew@kerwin.net.au> wrote:
> 
> Hmm, yeah, I think that might work.  I still have a bit of a hangup on
> steps 3 and 4:
> 
> ~~~
>   3.  If input_number contains ".", parse it as a floating point number
>       and let output_number be the result.
> 
>   4.  Otherwise, parse input_number as an integer and let output_number
>       be the result.
> ~~~
> 
> Most of the algorithms are an alternative representation of the ABNF
> for that type; however the what-is-currently-called-"number" algorithm
> takes any old guff and suddenly leaves you on your own, armed with
> nothing but two ABNF recipes and some value limits.  It doesn't even
> say "If an error is encountered, throw it" like the other algorithms.
> It doesn't feel right.
> 
> It could at least say:
> 
> ~~~
>   3. If input_number matches the <float> ABNF rule ...
>   4. Otherwise, if input_number matches the <integer> ABNF rule ...
>   5. Otherwise, barf.
> ~~~
> 
> Perhaps I'm just suffering from Friday afternoon laziness and would
> rather not have to think while typing code.

Yep, I created <https://github.com/httpwg/http-extensions/issues/475> to track this; wanted to make sure the split to integers and floats got traction before I did the work.

Cheers,


--
Mark Nottingham   https://www.mnot.net/

Received on Friday, 2 February 2018 06:06:24 UTC