From c6956527d1618110857af88885c7198881581f0d Mon Sep 17 00:00:00 2001 From: Daniel Hyles Date: Tue, 28 Dec 2021 07:32:17 +1100 Subject: [PATCH] Remove Content-Length header from camera snapshot response (#2860) * Update camera_web_server.cpp Removed the duplicated CONTENT_LENGTH header * Update camera_web_server.cpp * Update camera_web_server.cpp --- .../components/esp32_camera_web_server/camera_web_server.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/esphome/components/esp32_camera_web_server/camera_web_server.cpp b/esphome/components/esp32_camera_web_server/camera_web_server.cpp index 653a274bf4..f5ab0c7151 100644 --- a/esphome/components/esp32_camera_web_server/camera_web_server.cpp +++ b/esphome/components/esp32_camera_web_server/camera_web_server.cpp @@ -233,9 +233,6 @@ esp_err_t CameraWebServer::snapshot_handler_(struct httpd_req *req) { httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.jpg"); - if (res == ESP_OK) { - res = httpd_resp_set_hdr(req, CONTENT_LENGTH, esphome::to_string(image->get_data_length()).c_str()); - } if (res == ESP_OK) { res = httpd_resp_send(req, (const char *) image->get_data_buffer(), image->get_data_length()); }