|
|
@@ -10,6 +10,7 @@
|
|
|
#include "freertos/task.h"
|
|
|
#include <new>
|
|
|
#include <cstring>
|
|
|
+#include <string.h>
|
|
|
|
|
|
|
|
|
#define HTTPD_401 "401 UNAUTHORIZED"
|
|
|
@@ -85,7 +86,8 @@ esp_err_t dispatch_camera_http_request_async(httpd_req_t *req,
|
|
|
if (copyResult != ESP_OK) {
|
|
|
delete work;
|
|
|
xSemaphoreGive(cameraAsyncRequestSlot);
|
|
|
- httpd_resp_send_err(req, HTTPD_503_SERVICE_UNAVAILABLE, "Could not queue camera request");
|
|
|
+ httpd_resp_set_status(req, "503 Service Unavailable");
|
|
|
+ httpd_resp_sendstr(req, "Could not queue camera request");
|
|
|
return ESP_OK;
|
|
|
}
|
|
|
|
|
|
@@ -101,8 +103,9 @@ esp_err_t dispatch_camera_http_request_async(httpd_req_t *req,
|
|
|
if (xTaskCreatePinnedToCore(async_camera_http_request_task, "camera_http",
|
|
|
8 * 1024, work, tskIDLE_PRIORITY + 3,
|
|
|
NULL, 1) != pdPASS) {
|
|
|
- httpd_resp_send_err(req, HTTPD_503_SERVICE_UNAVAILABLE, "Could not start camera request worker");
|
|
|
httpd_req_async_handler_complete(asyncRequest);
|
|
|
+ httpd_resp_set_status(req, "503 Service Unavailable");
|
|
|
+ httpd_resp_sendstr(req, "Could not start camera request worker");
|
|
|
delete work;
|
|
|
xSemaphoreGive(cameraAsyncRequestSlot);
|
|
|
return ESP_OK;
|