mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-06-11 17:17:17 +00:00
Compare commits
3 Commits
ec5ce17929
...
a1fdc07f34
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1fdc07f34 | ||
|
|
eb49a304b6 | ||
|
|
a9bfe5914b |
3
.github/workflows/test-32bit.yml
vendored
3
.github/workflows/test-32bit.yml
vendored
@@ -21,7 +21,8 @@ jobs:
|
|||||||
- name: Build (Win32)
|
- name: Build (Win32)
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
|
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set VSDIR=%%i
|
||||||
|
call "%VSDIR%\VC\Auxiliary\Build\vcvarsall.bat" x86 || exit /b 1
|
||||||
cl /std:c++14 /EHsc /W4 /WX /c /Fo:NUL test\test_32bit_build.cpp
|
cl /std:c++14 /EHsc /W4 /WX /c /Fo:NUL test\test_32bit_build.cpp
|
||||||
|
|
||||||
test-arm32:
|
test-arm32:
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ ifneq ($(OS), Windows_NT)
|
|||||||
OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -lssl -lcrypto
|
OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -lssl -lcrypto
|
||||||
MBEDTLS_SUPPORT = -DCPPHTTPLIB_MBEDTLS_SUPPORT -lmbedtls -lmbedx509 -lmbedcrypto
|
MBEDTLS_SUPPORT = -DCPPHTTPLIB_MBEDTLS_SUPPORT -lmbedtls -lmbedx509 -lmbedcrypto
|
||||||
WOLFSSL_SUPPORT = -DCPPHTTPLIB_WOLFSSL_SUPPORT -lwolfssl
|
WOLFSSL_SUPPORT = -DCPPHTTPLIB_WOLFSSL_SUPPORT -lwolfssl
|
||||||
# Disable ASLR for ASAN compatibility on WSL2 (high-entropy ASLR conflicts with ASAN shadow memory)
|
ifeq ($(UNAME_S), Linux)
|
||||||
SETARCH = setarch $(shell uname -m) -R
|
# Disable ASLR for ASAN compatibility on WSL2 (high-entropy ASLR conflicts with ASAN shadow memory)
|
||||||
|
SETARCH = setarch $(shell uname -m) -R
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -291,10 +291,12 @@ template <typename T> void KeepAliveTest(T &cli, bool basic) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
auto res = cli.Get("/get");
|
auto res = cli.Get("/get");
|
||||||
|
ASSERT_TRUE(res != nullptr);
|
||||||
EXPECT_EQ(StatusCode::OK_200, res->status);
|
EXPECT_EQ(StatusCode::OK_200, res->status);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto res = cli.Get("/redirect/2");
|
auto res = cli.Get("/redirect/2");
|
||||||
|
ASSERT_TRUE(res != nullptr);
|
||||||
EXPECT_EQ(StatusCode::OK_200, res->status);
|
EXPECT_EQ(StatusCode::OK_200, res->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,6 +308,7 @@ template <typename T> void KeepAliveTest(T &cli, bool basic) {
|
|||||||
|
|
||||||
for (auto path : paths) {
|
for (auto path : paths) {
|
||||||
auto res = cli.Get(path.c_str());
|
auto res = cli.Get(path.c_str());
|
||||||
|
ASSERT_TRUE(res != nullptr);
|
||||||
auto body = normalizeJson(res->body);
|
auto body = normalizeJson(res->body);
|
||||||
EXPECT_TRUE(body.find("\"authenticated\":true") != std::string::npos);
|
EXPECT_TRUE(body.find("\"authenticated\":true") != std::string::npos);
|
||||||
EXPECT_TRUE(body.find("\"user\":\"hello\"") != std::string::npos);
|
EXPECT_TRUE(body.find("\"user\":\"hello\"") != std::string::npos);
|
||||||
@@ -317,6 +320,7 @@ template <typename T> void KeepAliveTest(T &cli, bool basic) {
|
|||||||
int count = 10;
|
int count = 10;
|
||||||
while (count--) {
|
while (count--) {
|
||||||
auto res = cli.Get("/get");
|
auto res = cli.Get("/get");
|
||||||
|
ASSERT_TRUE(res != nullptr);
|
||||||
EXPECT_EQ(StatusCode::OK_200, res->status);
|
EXPECT_EQ(StatusCode::OK_200, res->status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user