Handle whitespace separating an 'ip port' correctly (RIPD-552)

This commit is contained in:
Nik Bougalis
2014-09-02 17:37:25 -07:00
committed by Vinnie Falco
parent b12676f701
commit 4f0a20ec68
2 changed files with 16 additions and 2 deletions

View File

@@ -79,14 +79,14 @@ Endpoint Endpoint::from_string_altform (std::string const& s)
if (is.rdbuf()->in_avail()>0)
{
if (! IP::detail::expect (is, ' '))
if (! IP::detail::expect_whitespace (is))
return Endpoint();
while (is.rdbuf()->in_avail()>0)
{
char c;
is.get(c);
if (c != ' ')
if (!isspace (c))
{
is.unget();
break;