mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
10 files changed
+35
-20
No files matched your search
@@ -64,7 +64,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 2 }
|
||||
- run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test s390 SSL=${{ matrix.ssl }}
|
||||
- run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test s390 SSL=${{ matrix.ssl }}
|
||||
armhf:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 2 }
|
||||
- run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test armhf SSL=${{ matrix.ssl }}
|
||||
- run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test armhf SSL=${{ matrix.ssl }}
|
||||
unamalgamated-mg_prefix:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@@ -301,6 +301,8 @@ jobs:
|
||||
with: { fetch-depth: 2 }
|
||||
- run: echo # nothing specific to install or do
|
||||
- run: make -C examples/arduino arduino-xiao
|
||||
# TODO(): - run: make -C examples/arduino arduino-esp32
|
||||
# TODO(): - run: make -C examples/arduino arduino-teensy41
|
||||
# - run: make -C examples/arduino arduino-nano
|
||||
- run: make -C examples/arduino clean
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
with: { fetch-depth: 2 }
|
||||
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test s390
|
||||
run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test s390
|
||||
armhf:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
with: { fetch-depth: 2 }
|
||||
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test armhf
|
||||
run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test armhf
|
||||
unamalgamated-mg_prefix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -14,6 +14,7 @@ arduino-xiao-board:
|
||||
./arduino/arduino --install-boards Seeeduino:samd
|
||||
|
||||
arduino-xiao: arduino arduino-xiao-board
|
||||
cd sim800-mqtt && ../arduino/arduino --verbose --verify --board Seeeduino:samd:seeed_XIAO_m0 sim800-mqtt.ino
|
||||
cd w5500-http && ../arduino/arduino --verbose --verify --board Seeeduino:samd:seeed_XIAO_m0 w5500-http.ino
|
||||
cd w5500-mqtt && ../arduino/arduino --verbose --verify --board Seeeduino:samd:seeed_XIAO_m0 w5500-mqtt.ino
|
||||
|
||||
@@ -21,6 +22,18 @@ arduino-nano: arduino
|
||||
cd w5500-http && ../arduino/arduino --pref compiler.cpp.extra_flags=-DMG_ENABLE_LOG=0 --verbose --verify --board arduino:avr:nano w5500-http.ino
|
||||
cd w5500-mqtt && ../arduino/arduino --pref compiler.cpp.extra_flags=-DMG_ENABLE_LOG=0 --verbose --verify --board arduino:avr:nano w5500-mqtt.ino
|
||||
|
||||
arduino-esp32: arduino
|
||||
# cd esp32-http && ../arduino/arduino --verbose --verify --board esp32-http.ino
|
||||
# esp32-mqtt
|
||||
|
||||
arduino-teensy41: arduino
|
||||
# cd teensy41-http && ../arduino/arduino --verbose --verify --board teensy41-http.ino
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf arduino
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ build: pico-sdk
|
||||
cd build && cmake -G "Unix Makefiles" .. && make
|
||||
|
||||
pico-sdk:
|
||||
git clone --depth 1 -b 1.4.0 https://github.com/raspberrypi/pico-sdk $@
|
||||
git clone --depth 1 -b 2.1.0 https://github.com/raspberrypi/pico-sdk $@
|
||||
cd $@ && git submodule update --init
|
||||
|
||||
clean:
|
||||
|
||||
@@ -13,7 +13,7 @@ build build/firmware.uf2: pico-sdk main.c net.c
|
||||
cd build && cmake -G "Unix Makefiles" .. && make
|
||||
|
||||
pico-sdk:
|
||||
git clone --depth 1 -b 1.5.0 https://github.com/raspberrypi/pico-sdk $@
|
||||
git clone --depth 1 -b 2.1.0 https://github.com/raspberrypi/pico-sdk $@
|
||||
cd $@ && git submodule update --init
|
||||
|
||||
clean:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
static struct mg_tcpip_if *s_ifp;
|
||||
|
||||
const uint8_t tud_network_mac_address[6] = {2, 2, 0x84, 0x6A, 0x96, 0};
|
||||
uint8_t tud_network_mac_address[6] = {2, 2, 0x84, 0x6A, 0x96, 0};
|
||||
|
||||
static void blink_cb(void *arg) { // Blink periodically
|
||||
gpio_put(PICO_DEFAULT_LED_PIN, !gpio_get_out_level(PICO_DEFAULT_LED_PIN));
|
||||
|
||||
@@ -13,7 +13,7 @@ build build/firmware.uf2: pico-sdk main.c net.c
|
||||
cd build && cmake -G "Unix Makefiles" .. && make
|
||||
|
||||
pico-sdk:
|
||||
git clone --depth 1 -b 1.5.0 https://github.com/raspberrypi/pico-sdk $@
|
||||
git clone --depth 1 -b 2.1.0 https://github.com/raspberrypi/pico-sdk $@
|
||||
cd $@ && git submodule update --init
|
||||
|
||||
clean:
|
||||
|
||||
@@ -25,7 +25,7 @@ int hal_led_pin(void) {
|
||||
|
||||
static struct mg_tcpip_if *s_ifp;
|
||||
|
||||
const uint8_t tud_network_mac_address[6] = {2, 2, 0x84, 0x6A, 0x96, 0};
|
||||
uint8_t tud_network_mac_address[6] = {2, 2, 0x84, 0x6A, 0x96, 0};
|
||||
|
||||
bool tud_network_recv_cb(const uint8_t *buf, uint16_t len) {
|
||||
mg_tcpip_qwrite((void *) buf, len, s_ifp);
|
||||
|
||||
@@ -3,4 +3,3 @@
|
||||
#define MG_ENABLE_TCPIP 1
|
||||
#define MG_ENABLE_TCPIP_DRIVER_INIT 0
|
||||
#define MG_ENABLE_PACKED_FS 1
|
||||
|
||||
+11
-10
@@ -1469,6 +1469,7 @@ static void test_http_no_content_length(void) {
|
||||
char buf[100];
|
||||
struct mg_mgr mgr;
|
||||
const char *url = "http://127.0.0.1:12348";
|
||||
const char *url2 = "http://127.0.0.1:12349";
|
||||
int i;
|
||||
const char *post_req =
|
||||
"POST / HTTP/1.1\r\nContent-Type:"
|
||||
@@ -1482,17 +1483,17 @@ static void test_http_no_content_length(void) {
|
||||
ASSERT(strcmp(buf1, "mc") == 0);
|
||||
ASSERT(strcmp(buf2, "mc") == 0);
|
||||
mg_mgr_free(&mgr);
|
||||
|
||||
// 12348 is in TIME_WAIT, use another port
|
||||
mg_mgr_init(&mgr);
|
||||
mg_http_listen(&mgr, url, f41, (void *) NULL);
|
||||
ASSERT(fetch(&mgr, buf, url, "POST / HTTP/1.1\r\n\r\n") == 411);
|
||||
ASSERT(fetch(&mgr, buf, url, "HTTP/1.1 200\r\n\r\n") == 411);
|
||||
ASSERT(fetch(&mgr, buf, url, "HTTP/1.1 100\r\n\r\n") != 411);
|
||||
ASSERT(fetch(&mgr, buf, url, "HTTP/1.1 304\r\n\r\n") != 411);
|
||||
ASSERT(fetch(&mgr, buf, url, "HTTP/1.1 305\r\n\r\n") == 411);
|
||||
ASSERT(fetch(&mgr, buf, url, post_req) != 411);
|
||||
mg_http_listen(&mgr, url2, f41, (void *) NULL);
|
||||
ASSERT(fetch(&mgr, buf, url2, "POST / HTTP/1.1\r\n\r\n") == 411);
|
||||
ASSERT(fetch(&mgr, buf, url2, "HTTP/1.1 200\r\n\r\n") == 411);
|
||||
ASSERT(fetch(&mgr, buf, url2, "HTTP/1.1 100\r\n\r\n") != 411);
|
||||
ASSERT(fetch(&mgr, buf, url2, "HTTP/1.1 304\r\n\r\n") != 411);
|
||||
ASSERT(fetch(&mgr, buf, url2, "HTTP/1.1 305\r\n\r\n") == 411);
|
||||
ASSERT(fetch(&mgr, buf, url2, post_req) != 411);
|
||||
// Check it is processed only once (see #2811)
|
||||
ASSERT(fpr(&mgr, buf, url, "POST / HTTP/1.1\r\n\r\n") == 411);
|
||||
ASSERT(fpr(&mgr, buf, url2, "POST / HTTP/1.1\r\n\r\n") == 411);
|
||||
mg_mgr_free(&mgr);
|
||||
ASSERT(mgr.conns == NULL);
|
||||
}
|
||||
@@ -1772,7 +1773,7 @@ static void ehr(struct mg_connection *c, int ev, void *ev_data) {
|
||||
|
||||
static void test_http_range(void) {
|
||||
struct mg_mgr mgr;
|
||||
const char *url = "http://127.0.0.1:12349";
|
||||
const char *url = "http://127.0.0.1:12350";
|
||||
struct mg_http_message hm;
|
||||
char buf[FETCH_BUF_SIZE];
|
||||
|
||||
|
||||
Reference in new issue
Block a user