Skip to content

Commit 8ca6921

Browse files
committed
tests
1 parent 1dff394 commit 8ca6921

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/mip_tap_test.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static int fetch(struct mg_mgr *mgr, char *buf, const char *url,
253253
static void test_http_client(struct mg_mgr *mgr) {
254254
char buf[FETCH_BUF_SIZE];
255255
int rc = 0;
256-
const bool ipv6 = 0;
256+
const bool ipv6 = MG_ENABLE_IPV6;
257257
#if MG_TLS
258258
if (ipv6) {
259259
rc = fetch(mgr, buf, "https://ipv6.google.com",
@@ -267,11 +267,12 @@ static void test_http_client(struct mg_mgr *mgr) {
267267
if (ipv6) {
268268
rc = fetch(mgr, buf, "http://ipv6.google.com",
269269
"GET / HTTP/1.0\r\nHost: ipv6.google.com\r\n\r\n");
270+
ASSERT(rc == 200); // OK
270271
} else {
271272
rc = fetch(mgr, buf, "http://cesanta.com",
272273
"GET /robots.txt HTTP/1.0\r\nHost: cesanta.com\r\n\r\n");
274+
ASSERT(rc == 301); // OK: Permanently moved (HTTP->HTTPS redirect)
273275
}
274-
ASSERT(rc == 301); // OK: Permanently moved (HTTP->HTTPS redirect)
275276

276277
#endif
277278
}

0 commit comments

Comments
 (0)