mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
misc fixes
This commit is contained in:
1 parent
7d53c21efe
commit
446b400667
3 files changed
+13
-5
No files matched your search
@@ -170,7 +170,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
ssl: ["", -DMG_TLS=MG_TLS_BUILTIN]
|
ssl: [-DMG_TLS=MG_TLS_NONE, -DMG_TLS=MG_TLS_BUILTIN]
|
||||||
name: examples ${{ matrix.ssl }}
|
name: examples ${{ matrix.ssl }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -517,7 +517,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with: { fetch-depth: 2 }
|
with: { fetch-depth: 2 }
|
||||||
- run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi
|
- run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi
|
||||||
- run: make -C examples/zephyr init REPO=zephyrprojectrtos/ci:v.0.26.14 # "no space left on device" with newers
|
- run: make -C examples/zephyr init REPO=zephyrprojectrtos/ci:v0.26.14 # "no space left on device" with newers
|
||||||
- name: minify manifest
|
- name: minify manifest
|
||||||
uses: mikefarah/yq@master
|
uses: mikefarah/yq@master
|
||||||
with:
|
with:
|
||||||
|
|||||||
+3
-3
@@ -346,10 +346,10 @@ static void test_tls(struct mg_mgr *mgr) {
|
|||||||
char buf[FETCH_BUF_SIZE]; // make sure it can hold Makefile
|
char buf[FETCH_BUF_SIZE]; // make sure it can hold Makefile
|
||||||
struct mg_str data = mg_unpacked("/Makefile");
|
struct mg_str data = mg_unpacked("/Makefile");
|
||||||
if (host_ip == NULL) {
|
if (host_ip == NULL) {
|
||||||
MG_INFO(("No HOST_IP provided, skipping tests"));
|
printf("\nNo HOST_IP provided, skipping TLS tests\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MG_DEBUG(("HOST_IP: %s", host_ip));
|
printf("HOST_IP: %s\n", host_ip);
|
||||||
// - POST a large file, make sure we drain TLS buffers and read all: done at
|
// - POST a large file, make sure we drain TLS buffers and read all: done at
|
||||||
// server test, using curl as POSTing client
|
// server test, using curl as POSTing client
|
||||||
// - Fire patched server, test multiple TLS records per TCP segment handling
|
// - Fire patched server, test multiple TLS records per TCP segment handling
|
||||||
@@ -358,7 +358,7 @@ static void test_tls(struct mg_mgr *mgr) {
|
|||||||
sleep(1);
|
sleep(1);
|
||||||
ASSERT(fetch(mgr, buf, url, "GET /thefile HTTP/1.0\n\n") == 200);
|
ASSERT(fetch(mgr, buf, url, "GET /thefile HTTP/1.0\n\n") == 200);
|
||||||
ASSERT(cmpbody(buf, data.buf) == 0); // "thefile" links to Makefile
|
ASSERT(cmpbody(buf, data.buf) == 0); // "thefile" links to Makefile
|
||||||
ASSERT(system("killall tls_multirec/server"));
|
ASSERT(system("killall tls_multirec/server") == 0);
|
||||||
free(url);
|
free(url);
|
||||||
#else
|
#else
|
||||||
(void) cmpbody("", "");
|
(void) cmpbody("", "");
|
||||||
|
|||||||
@@ -1327,7 +1327,9 @@ static void test_tls(void) {
|
|||||||
"Content-Length: %lu\n\n"
|
"Content-Length: %lu\n\n"
|
||||||
"%s",
|
"%s",
|
||||||
data.len, data.buf) == 200);
|
data.len, data.buf) == 200);
|
||||||
|
#if MG_TLS == MG_TLS_BUILTIN
|
||||||
// fire patched server, test multiple TLS records per TCP segment handling
|
// fire patched server, test multiple TLS records per TCP segment handling
|
||||||
|
// skip other TLS stacks to avoid "bad client hello", we are 1.3 only
|
||||||
{
|
{
|
||||||
ASSERT(system("tls_multirec/server -d tls_multirec &") == 0);
|
ASSERT(system("tls_multirec/server -d tls_multirec &") == 0);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@@ -1338,6 +1340,12 @@ static void test_tls(void) {
|
|||||||
ASSERT(cmpbody(buf, data.buf) == 0); // "thefile" links to Makefile
|
ASSERT(cmpbody(buf, data.buf) == 0); // "thefile" links to Makefile
|
||||||
ASSERT(system("killall tls_multirec/server") == 0);
|
ASSERT(system("killall tls_multirec/server") == 0);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
printf(
|
||||||
|
"\n Skipping multiple TLS records per TCP segment handling test, server "
|
||||||
|
"is 1.3 only; re-enable when other stacks can be easily configured for "
|
||||||
|
"1.3\n");
|
||||||
|
#endif
|
||||||
mg_mgr_free(&mgr);
|
mg_mgr_free(&mgr);
|
||||||
ASSERT(mgr.conns == NULL);
|
ASSERT(mgr.conns == NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user