Skip to content

Commit ade7513

Browse files
author
Dean Michael Berris
committed
Closes #14 -- use Boost.String_algorithm is_digit to determine version major and minor characters, according to RFC.
1 parent 2738ad0 commit ade7513

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

boost/network/protocol/http/parser/incremental.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ namespace boost { namespace network { namespace http {
113113
}
114114
break;
115115
case http_version_slash:
116-
if (*current == '1') {
116+
// FIXME find a better way to use is_digit
117+
if (algorithm::is_digit()(*current)) {
117118
state_ = http_version_major;
118119
++current;
119120
} else {
@@ -129,7 +130,8 @@ namespace boost { namespace network { namespace http {
129130
}
130131
break;
131132
case http_version_dot:
132-
if (*current == '1' || *current == '0') {
133+
// FIXME find a better way to use is_digit
134+
if (algorithm::is_digit()(*current)) {
133135
state_ = http_version_minor;
134136
++current;
135137
} else {

0 commit comments

Comments
 (0)