[monitoring-plugins] Remove superflous CRLF in HTTP-Requests in ...

GitHub git at monitoring-plugins.org
Sat Nov 5 14:00:11 CET 2022


    Module: monitoring-plugins
    Branch: master
    Commit: edc84e5d669089fa3f047dc52740679e7cb58fc1
    Author: Lorenz <12514511+RincewindsHat at users.noreply.github.com>
 Committer: GitHub <noreply at github.com>
      Date: Sat Nov  5 13:59:45 2022 +0100
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=edc84e5

Remove superflous CRLF in HTTP-Requests in check_http (#1798)

* Remove superflous CRLF in HTTP-Requests in check_http

---

 plugins/check_http.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/check_http.c b/plugins/check_http.c
index ff39c59..41d4781 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -1070,9 +1070,8 @@ check_http (void)
     }
 
     xasprintf (&buf, "%sContent-Length: %i\r\n\r\n", buf, (int)strlen (http_post_data));
-    xasprintf (&buf, "%s%s%s", buf, http_post_data, CRLF);
-  }
-  else {
+    xasprintf (&buf, "%s%s", buf, http_post_data);
+  } else {
     /* or just a newline so the server knows we're done with the request */
     xasprintf (&buf, "%s%s", buf, CRLF);
   }



More information about the Commits mailing list