Skip to content

Commit

Permalink
Disallow "-" inside numbers
Browse files Browse the repository at this point in the history
For #475
  • Loading branch information
mnot committed Apr 2, 2018
1 parent f198c16 commit 9fa3ef4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions draft-ietf-httpbis-header-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,10 @@ NOTE: This algorithm parses both Integers and Floats {{float}}, and returns the

1. If the first character of input_string is not "-" or a DIGIT, fail parsing.
2. Let input_number be the result of consuming input_string up to (but not including) the first character that is not in DIGIT, "-", and ".".
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.
5. Return output_number.
3. If any character of input_number after the first is "-", fail parsing.
4. If input_number contains ".", parse it as a floating point number and let output_number be the result.
5. Otherwise, parse input_number as an integer and let output_number be the result.
6. Return output_number.


## Floats {#float}
Expand Down

0 comments on commit 9fa3ef4

Please sign in to comment.