mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
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
This commit is contained in:
parent
72c6bfaa50
commit
c6956527d1
1 changed files with 0 additions and 3 deletions
|
@ -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");
|
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) {
|
if (res == ESP_OK) {
|
||||||
res = httpd_resp_send(req, (const char *) image->get_data_buffer(), image->get_data_length());
|
res = httpd_resp_send(req, (const char *) image->get_data_buffer(), image->get_data_length());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue