mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 09:43:51 +00:00
Fixed Unit test failures on Windows
This commit is contained in:
parent
315c11d6e2
commit
6a608b3ed4
@ -1383,6 +1383,10 @@ inline bool Client::read_response_line(Stream& strm, Response& res)
|
|||||||
|
|
||||||
inline bool Client::send(const Request& req, Response& res)
|
inline bool Client::send(const Request& req, Response& res)
|
||||||
{
|
{
|
||||||
|
if (req.path.empty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
auto sock = detail::create_client_socket(host_.c_str(), port_);
|
auto sock = detail::create_client_socket(host_.c_str(), port_);
|
||||||
if (sock == -1) {
|
if (sock == -1) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -392,8 +392,7 @@ TEST_F(ServerTest, InvalidBaseDir)
|
|||||||
TEST_F(ServerTest, EmptyRequest)
|
TEST_F(ServerTest, EmptyRequest)
|
||||||
{
|
{
|
||||||
auto res = cli_.get("");
|
auto res = cli_.get("");
|
||||||
ASSERT_TRUE(res != nullptr);
|
ASSERT_TRUE(res == nullptr);
|
||||||
EXPECT_EQ(400, res->status);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ServerTest, LongRequest)
|
TEST_F(ServerTest, LongRequest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user