Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop read()ing when Content-Length matches the amount of content received #515

Merged

Conversation

sawolf
Copy link
Member

@sawolf sawolf commented Jan 31, 2020

Resolve #507

Prior to this commit, check_http relied on read() returning 0 or erroring in order to
exit the loop. This commit keeps the same behavior, but once headers have been received,
it also reads the Content-Length and compares it to the number of bytes received after
the start of the body.

… the amount of content received

Prior to this commit, check_http relied on read() returning 0 or erroring in order to
exit the loop. This commit keeps the same behavior, but once headers have been received,
it also reads the Content-Length and compares it to the number of bytes received after
the start of the body.
@sawolf sawolf merged commit 46b49a4 into nagios-plugins:master Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checking VictoriaMetrics health endpoint returns socket timeout
1 participant