236 sprintf(c_type, "image/svg+xml"); |
236 sprintf(c_type, "image/svg+xml"); |
237 } else if (strcmp(".oga", &temp_url[strlen(temp_url) - 4]) == 0) { |
237 } else if (strcmp(".oga", &temp_url[strlen(temp_url) - 4]) == 0) { |
238 sprintf(c_type, "audio/ogg"); |
238 sprintf(c_type, "audio/ogg"); |
239 } else if (strcmp(".ico", &temp_url[strlen(temp_url) - 4]) == 0) { |
239 } else if (strcmp(".ico", &temp_url[strlen(temp_url) - 4]) == 0) { |
240 sprintf(c_type, "image/x-icon"); |
240 sprintf(c_type, "image/x-icon"); |
|
241 } else if (strcmp(".ttf", &temp_url[strlen(temp_url) - 4]) == 0) { |
|
242 sprintf(c_type, "font/ttf"); |
|
243 } else if (strcmp(".woff", &temp_url[strlen(temp_url) - 5]) == 0) { |
|
244 sprintf(c_type, "font/woff"); |
|
245 } else if (strcmp(".woff2", &temp_url[strlen(temp_url) - 6]) == 0) { |
|
246 sprintf(c_type, "font/woff2"); |
241 } else if (strcmp(".xml", &temp_url[strlen(temp_url) - 4]) == 0) { |
247 } else if (strcmp(".xml", &temp_url[strlen(temp_url) - 4]) == 0) { |
242 sprintf(c_type, "text/xml"); |
248 sprintf(c_type, "text/xml"); |
243 } else { |
249 } else { |
244 sprintf(c_type, "application/octet-stream"); |
250 sprintf(c_type, "application/octet-stream"); |
245 printf("Unknown content type for %s\n", temp_url); |
251 printf("Unknown content type for %s\n", temp_url); |
594 void start_http_websocket(void) |
600 void start_http_websocket(void) |
595 { |
601 { |
596 ESP_LOGI(TAG, "Start HTTP/Websocket server"); |
602 ESP_LOGI(TAG, "Start HTTP/Websocket server"); |
597 |
603 |
598 ws_server_start(); |
604 ws_server_start(); |
599 xTaskCreate(&task_HTTPserver, "HTTPserver", 3000, NULL, 9, &xTaskHTTP); |
605 xTaskCreate(&task_HTTPserver, "HTTPserver", 4000, NULL, 9, &xTaskHTTP); |
600 xTaskCreate(&task_Queue, "Queue", 4000, NULL, 6, &xTaskQueue); |
606 xTaskCreate(&task_Queue, "Queue", 5000, NULL, 6, &xTaskQueue); |
601 } |
607 } |
602 |
608 |