Fix http params handling discrepancy (#913)

Fixes #909
This commit is contained in:
Alex Kremer
2023-10-10 12:23:40 +01:00
committed by GitHub
parent a541e6d00e
commit fca29694a0
4 changed files with 29 additions and 9 deletions

View File

@@ -549,7 +549,7 @@ TEST_F(WebRPCServerHandlerTest, HTTPParamsUnparseableNotArray)
EXPECT_EQ(session->lastStatus, boost::beast::http::status::bad_request);
}
TEST_F(WebRPCServerHandlerTest, HTTPParamsUnparseableEmptyArray)
TEST_F(WebRPCServerHandlerTest, HTTPParamsUnparseableArrayWithDigit)
{
static auto constexpr response = "params unparseable";
@@ -558,7 +558,7 @@ TEST_F(WebRPCServerHandlerTest, HTTPParamsUnparseableEmptyArray)
static auto constexpr requestJSON = R"({
"method": "ledger",
"params": []
"params": [1]
})";
EXPECT_CALL(*rpcEngine, notifyBadSyntax).Times(1);