Skip to content

Commit 8e7a813

Browse files
committed
Fix: isalpha -> isalnum
1 parent b7f5806 commit 8e7a813

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/httpparser/urlparser.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class UrlParser
158158
switch(state)
159159
{
160160
case Scheme:
161-
if( isalpha(ch) || ch == '+' || ch == '-' || ch == '.')
161+
if( isalnum(ch) || ch == '+' || ch == '-' || ch == '.')
162162
{
163163
url.scheme += ch;
164164
}
@@ -225,7 +225,7 @@ class UrlParser
225225
}
226226
break;
227227
case Password:
228-
if( isalpha(ch) || ch == '%' )
228+
if( isalnum(ch) || ch == '%' )
229229
{
230230
url.password += ch;
231231
}
@@ -276,7 +276,7 @@ class UrlParser
276276
url.integerPort = atoi(url.port.c_str());
277277
state = Path;
278278
}
279-
else if( isalpha(ch) || ch == '%' )
279+
else if( isalnum(ch) || ch == '%' )
280280
{
281281
std::swap(url.username, usernameOrHostname);
282282
std::swap(url.password, portOrPassword);

0 commit comments

Comments
 (0)