[Nagiosplug-checkins] CVS: nagiosplug/plugins check_http.c,1.15,1.16

Karl DeBisschop kdebisschop at users.sourceforge.net
Sun Jan 26 22:05:02 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv3174/plugins

Modified Files:
	check_http.c 
Log Message:
we were sending extra CRLF

Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** check_http.c	16 Jan 2003 06:29:02 -0000	1.15
--- check_http.c	27 Jan 2003 06:04:03 -0000	1.16
***************
*** 598,602 ****
  		}
  
! 		/* optionally send http POST data */
  		if (http_post_data) {
  			asprintf (&buf, "Content-Type: application/x-www-form-urlencoded\r\n");
--- 598,602 ----
  		}
  
! 		/* either send http POST data */
  		if (http_post_data) {
  			asprintf (&buf, "Content-Type: application/x-www-form-urlencoded\r\n");
***************
*** 616,625 ****
  			}
  		}
! 
! 		/* send a newline so the server knows we're done with the request */
! 		asprintf (&buf, "\r\n\r\n");
! 		if (SSL_write (ssl, buf, strlen (buf)) == -1) {
! 			ERR_print_errors_fp (stderr);
! 			return STATE_CRITICAL;
  		}
  
--- 616,626 ----
  			}
  		}
! 		else {
! 			/* or just a newline so the server knows we're done with the request */
! 			asprintf (&buf, "\r\n");
! 			if (SSL_write (ssl, buf, strlen (buf)) == -1) {
! 				ERR_print_errors_fp (stderr);
! 				return STATE_CRITICAL;
! 			}
  		}
  
***************
*** 653,657 ****
  		}
  
! 		/* optionally send http POST data */
  		/* written by Chris Henesy <lurker at shadowtech.org> */
  		if (http_post_data) {
--- 654,658 ----
  		}
  
! 		/* either send http POST data */
  		/* written by Chris Henesy <lurker at shadowtech.org> */
  		if (http_post_data) {
***************
*** 663,670 ****
  			send (sd, http_post_data, strlen (http_post_data), 0);
  		}
! 
! 		/* send a newline so the server knows we're done with the request */
! 		asprintf (&buf, "\r\n");
! 		send (sd, buf, strlen (buf), 0);
  #ifdef HAVE_SSL
  	}
--- 664,672 ----
  			send (sd, http_post_data, strlen (http_post_data), 0);
  		}
! 		else {
! 			/* send a newline so the server knows we're done with the request */
! 			asprintf (&buf, "\r\n");
! 			send (sd, buf, strlen (buf), 0);
! 		}
  #ifdef HAVE_SSL
  	}





More information about the Commits mailing list