W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2020

Re: draft-ietf-httpbis-header-structure-15, Serializing a Decimal

From: Mark Nottingham <mnot@mnot.net>
Date: Thu, 30 Jan 2020 09:22:39 +1100
Cc: Kari Hurtta <hurtta-ietf@elmme-mailer.org>, HTTP Working Group <ietf-http-wg@w3.org>, Poul-Henning Kamp <phk@varnish-cache.org>
Message-Id: <E21838F2-98E1-4FB6-92FB-4B79B05E80ED@mnot.net>
To: "Julian F. Reschke" <julian.reschke@gmx.de>


> On 30 Jan 2020, at 5:41 am, Julian Reschke <julian.reschke@gmx.de> wrote:
> 
> On 29.01.2020 19:17, Kari Hurtta wrote:
>> 4.1.5.  Serializing a Decimal
>> https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15#section-4.1.5
>> 
>> 
>> |   Given a decimal_number as input_decimal, return an ASCII string
>> |   suitable for use in a HTTP header value.
>> |
>> |   1.  Let output be an empty string.
>> |
>> |   2.  If input_decimal is less than (but not equal to) 0, append "-" to
>> |       output.
>> |
>> |   3.  Append input_decimal's integer component represented in base 10
>> |       (using only decimal digits) to output; if it is zero, append "0".
>> ...
> 
> That seems to assume that the integer component always is positive...?

How so? Is "using only decimal digits" unclear?


--
Mark Nottingham   https://www.mnot.net/
Received on Wednesday, 29 January 2020 22:22:46 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 29 January 2020 22:22:47 UTC