[pkg-nagios-changes] [Git][nagios-team/pkg-monitoring-plugins][master] Update d/patch/13_check_http_fix_superflous_crlf

Jan Wagner (@waja) gitlab at salsa.debian.org
Sat Nov 5 14:08:46 GMT 2022



Jan Wagner pushed to branch master at Debian Nagios Maintainer Group / pkg-monitoring-plugins


Commits:
b61a8ea7 by Jan Wagner at 2022-11-05T14:02:42+00:00
Update d/patch/13_check_http_fix_superflous_crlf

- - - - -


1 changed file:

- debian/patches/13_check_http_fix_superflous_crlf


Changes:

=====================================
debian/patches/13_check_http_fix_superflous_crlf
=====================================
@@ -1,17 +1,17 @@
-From 8543f8e2cd72cbdd3aa8469c86ead50824fd88a6 Mon Sep 17 00:00:00 2001
+From f089d660902b726072f4e2fe619d8647d23914d3 Mon Sep 17 00:00:00 2001
 From: rincewind <rincewind at vulgrim.de>
 Date: Tue, 20 Apr 2021 12:15:27 +0200
-Subject: [PATCH] Remove superflous CRLF in HTTP-Requests in check_http
+Subject: [PATCH 1/2] 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 0b712665a..676cf6445 100644
+index ff39c5912..a606cbed0 100644
 --- a/plugins/check_http.c
 +++ b/plugins/check_http.c
-@@ -948,8 +948,7 @@ check_http (void)
+@@ -966,8 +966,7 @@ check_http (void)
      }
      asprintf (&buf, "%sProxy-Connection: keep-alive\r\n", buf);
      asprintf (&buf, "%sHost: %s\r\n", buf, host_name);
@@ -21,7 +21,7 @@ index 0b712665a..676cf6445 100644
      if (verbose) printf ("%s\n", buf);
      send(sd, buf, strlen (buf), 0);
      buf[0]='\0';
-@@ -1050,7 +1049,7 @@ check_http (void)
+@@ -1070,7 +1069,7 @@ check_http (void)
      }
  
      xasprintf (&buf, "%sContent-Length: %i\r\n\r\n", buf, (int)strlen (http_post_data));
@@ -30,3 +30,37 @@ index 0b712665a..676cf6445 100644
    }
    else {
      /* or just a newline so the server knows we're done with the request */
+
+From 0ac75e22bb729ca3adcc355aba8d451ce3a41c4e Mon Sep 17 00:00:00 2001
+From: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
+Date: Fri, 4 Nov 2022 12:41:08 +0100
+Subject: [PATCH 2/2] Readd some end of lines
+
+---
+ plugins/check_http.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/check_http.c b/plugins/check_http.c
+index a606cbed0..41d478163 100644
+--- a/plugins/check_http.c
++++ b/plugins/check_http.c
+@@ -966,7 +966,8 @@ check_http (void)
+     }
+     asprintf (&buf, "%sProxy-Connection: keep-alive\r\n", buf);
+     asprintf (&buf, "%sHost: %s\r\n", buf, host_name);
+-
++    /* we finished our request, send empty line with CRLF */
++    asprintf (&buf, "%s%s", buf, CRLF);
+     if (verbose) printf ("%s\n", buf);
+     send(sd, buf, strlen (buf), 0);
+     buf[0]='\0';
+@@ -1070,8 +1071,7 @@ check_http (void)
+ 
+     xasprintf (&buf, "%sContent-Length: %i\r\n\r\n", buf, (int)strlen (http_post_data));
+     xasprintf (&buf, "%s%s", buf, http_post_data);
+-  }
+-  else {
++  } else {
+     /* or just a newline so the server knows we're done with the request */
+     xasprintf (&buf, "%s%s", buf, CRLF);
+   }



View it on GitLab: https://salsa.debian.org/nagios-team/pkg-monitoring-plugins/-/commit/b61a8ea7dacce51f315e24ec8a3237a259d7fbb6

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-monitoring-plugins/-/commit/b61a8ea7dacce51f315e24ec8a3237a259d7fbb6
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20221105/d5e0569a/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list