Remove Content-Length header from chunked response
HTTP does not allow Content-Length header to be set when Transfer-Encoding is present (https://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.4.4) When chunked, Transfer-Encoding is set. This causes issues, for example when adding the camera to HomeAssistant, since it causes an error in the http library. This commit removes the Content-Length header in this case.pull/136/head
parent
db0112e9c2
commit
0648a513e8
|
|
@ -64,7 +64,6 @@ void Server_InitWebServer() {
|
|||
}
|
||||
return len;
|
||||
});
|
||||
response->addHeader("Content-Length", String(total_len));
|
||||
request->send(response);
|
||||
|
||||
} else {
|
||||
|
|
@ -1350,3 +1349,4 @@ String Server_TranslateBoolToString(bool i_data) {
|
|||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue