cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Fails Simple Get Request Validation

Open Radicalware opened this issue 3 years ago • 0 comments

curl -g 'https://api.binance.us/api/v3/exchangeInfo?symbols=["BNBBTC","BTCUSDT"]'

(on windows just remove the -g param)

This get request works just fine but fails when added to web::http::uri during the validate

uri.cpp >> we hit false after is_query_character is tested

        // if we see a ?, then the query is next
        if (*p == _XPLATSTR('?'))
        {
            // skip over the question mark
            p++;
            query_begin = p;

            // the query is delimited by a '#' (fragment) or EOS
            for (; *p != _XPLATSTR('#') && *p != _XPLATSTR('\0'); p++)
            {
                if (!is_query_character(*p))
                {
                    return false;
                }
            }
            query_end = p;
        }

Radicalware avatar Oct 11 '22 22:10 Radicalware