- edited description
- changed title to Invalid chunk size error
Invalid chunk size error
Configuration:
CHECK HOST zoom_linux WITH ADDRESS zoom.us
EVERY 300 CYCLES
IF FAILED
PORT 443
PROTOCOL https
REQUEST "/rest/download?os=linux"
CONTENT = '"zoom":\{"version":"5\.15\.11\.7239"'
FOR 2 CYCLES
THEN ALERT
Error:
[2023-09-02T17:51:22+0200] error : 'zoom_linux' failed protocol test [HTTP] at [zoom.us]:443/rest/download?os=linux [TCP/IP TLS] -- HTTP error: invalid chunk size: x-frame-
Only started occurring in recent days.
I am using Monit 5.32.0 on Debian 11. I saw there were previous issues to do with “invalid chunk size” that were fixed in 5.27.0, but this occurs in 5.32.0.
Comments (6)
-
reporter -
- changed status to open
-
reporter - edited description
-
The problem is caused by the HTTP header, which exceeds 512 bytes, that monit uses when parsing the header:
content-security-policy: upgrade-insecure-requests; default-src https://*.zoom.us https://zoom.us blob: 'self'; img-src https: about: blob: data: 'self'; style-src https: safari-extension: chrome-extension: 'unsafe-inline' data: 'self'; font-src https: safari-extension: chrome-extension: blob: data: 'self'; connect-src * about: blob: data: 'self'; media-src * rtmp: blob: data: 'self'; frame-src https: ms-appx-web: zoommtg: zoomus: wvjbscheme: zoomprc: data: blob: 'self'; object-src 'none'; base-uri 'none';
Quick workaround:
diff --git a/src/protocols/http.c b/src/protocols/http.c index 9ee1c73..d75940e 100644 --- a/src/protocols/http.c +++ b/src/protocols/http.c @@ -235,7 +235,7 @@ static void _processStatus(Socket_T socket, Port_T P) { static void _processHeaders(Socket_T socket, void (**processBody)(Socket_T socket, Port_T P, char **data, int *contentLength, ChecksumContext_T context), int *contentLength) { - char buf[512] = {}; + char buf[4096] = {}; *processBody = _processBodyUntilEOF; while (Socket_readLine(socket, buf, sizeof(buf))) {
We’ll fix it properly
-
repo owner - changed status to resolved
Fixed: Issue
#1086: The HTTP protocol test may return false error "HTTP error: invalid chunk size" if the HTTP response contained header with more then 511 bytes. We have increased the limit to 8192 bytes per header and will report "response header exceeded maximum size" error if the HTTP response contains longer header.→ <<cset 133821c92e3c>>
-
repo owner backport: Fixed: Issue
#1086: The HTTP protocol test may return false error "HTTP error: invalid chunk size" if the HTTP response contained header with more then 511 bytes. We have increased the limit to 8192 bytes per header and will report "response header exceeded maximum size" error if the HTTP response contains longer header.→ <<cset 4969c499e15b>>
- Log in to comment