|
@@ -210,7 +210,9 @@ static long fetch_data_size = 1024*1024;
|
|
static char *fetch_data;
|
|
static char *fetch_data;
|
|
static const char *inmemory_file_data = "hi there";
|
|
static const char *inmemory_file_data = "hi there";
|
|
static const char *upload_filename = "upload_test.txt";
|
|
static const char *upload_filename = "upload_test.txt";
|
|
|
|
+#if 0
|
|
static const char *upload_filename2 = "upload_test2.txt";
|
|
static const char *upload_filename2 = "upload_test2.txt";
|
|
|
|
+#endif
|
|
static const char *upload_ok_message = "upload successful";
|
|
static const char *upload_ok_message = "upload successful";
|
|
|
|
|
|
static const char *open_file_cb(const struct mg_connection *conn,
|
|
static const char *open_file_cb(const struct mg_connection *conn,
|
|
@@ -518,6 +520,7 @@ static void test_mg_download(int use_ssl) {
|
|
mg_close_connection(conn);
|
|
mg_close_connection(conn);
|
|
|
|
|
|
if (use_ssl) {
|
|
if (use_ssl) {
|
|
|
|
+#ifndef NO_SSL
|
|
/* Test SSL redirect */
|
|
/* Test SSL redirect */
|
|
ASSERT((conn = mg_download("localhost", atoi(HTTP_REDIRECT_PORT), 0,
|
|
ASSERT((conn = mg_download("localhost", atoi(HTTP_REDIRECT_PORT), 0,
|
|
ebuf, sizeof(ebuf), "%s",
|
|
ebuf, sizeof(ebuf), "%s",
|
|
@@ -527,6 +530,7 @@ static void test_mg_download(int use_ssl) {
|
|
ASSERT(h != NULL);
|
|
ASSERT(h != NULL);
|
|
ASSERT(strcmp(h, "https://127.0.0.1:" HTTPS_PORT "/data/4711") == 0);
|
|
ASSERT(strcmp(h, "https://127.0.0.1:" HTTPS_PORT "/data/4711") == 0);
|
|
mg_close_connection(conn);
|
|
mg_close_connection(conn);
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
|
|
|
|
/* Test new API */
|
|
/* Test new API */
|
|
@@ -558,6 +562,10 @@ static void test_mg_download(int use_ssl) {
|
|
|
|
|
|
static int websocket_data_handler(struct mg_connection *conn, int flags, char *data, size_t data_len)
|
|
static int websocket_data_handler(struct mg_connection *conn, int flags, char *data, size_t data_len)
|
|
{
|
|
{
|
|
|
|
+ (void)conn;
|
|
|
|
+ (void)flags;
|
|
|
|
+ (void)data;
|
|
|
|
+ (void)data_len;
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -882,6 +890,7 @@ static void test_request_replies(void) {
|
|
static int request_test_handler(struct mg_connection *conn, void *cbdata)
|
|
static int request_test_handler(struct mg_connection *conn, void *cbdata)
|
|
{
|
|
{
|
|
ASSERT(cbdata == (void*)7);
|
|
ASSERT(cbdata == (void*)7);
|
|
|
|
+ (void)conn;
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|