chisheng
chisheng
Sorry,I didn't explain my problem clearly.Pseudocode int main() { httplib::SSLClient cli(); cli.post();//first request is success sleep(60);//The server will close the connection after 60 seconds cli.post()//second request will failed,is_socket_alive() return true...
yes,the keep-alive timeout of http server is 60s
> @chisheng I now fixed it. Could you try the latest httplib.h in the master branch? If it works on your machine, I'll bump up the version number. Thanks! sorry,I...
Instead of GET request, Mey be use POST requests with both MultipartFormDataItems and ContentProviders can indicate the problem.I will do the test on x86 device using latest version,but it takes...
I think the most reasonable way to determine whether the ssl connection is broken by peer is to use the function SSL_ Peek() and SSL_ get_ Shutdown (), just as...
Use the following unit test code to reproduce the bug TEST(KeepAliveTest, SSLClientReconnection) { SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE); ASSERT_TRUE(svr.is_valid()); svr.set_keep_alive_timeout(1); std::string content="reconnect"; svr.Post("/hi", [](const httplib::Request &, httplib::Response &res) { res.set_content("Hello World!", "text/plain");...
Do you completely replace my unit test code or you just replace the original unit test get method with the post method? You must use the method with a provider...
Strangely, I replaced a computer and still can reproduce this bug.In theory, if you use the request function with the provider parameter, write_ Request() returns false, resulting in SSL_ Peek()...