crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs

httpheaderremoveheader.c (764B)


      1 /*************************************************************************
      2  * This file is part of Crosroads 1.23, a load balancer and fail over
      3  * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL.
      4  * Visit http://crossroads.e-tunity.com for information.
      5  *************************************************************************/
      6 #include "crossroads.h"
      7 
      8 void http_header_removeheader (HttpHeader *h, char const *hdr) {
      9     int i;
     10     char *cp;
     11 
     12     for (i = 0; i < h->nheader; i++)
     13 	if (h->header[i] && !strncasecmp (h->header[i], hdr, strlen(hdr))) {
     14 	    cp = h->header[i] + strlen(hdr);
     15 	    if (*cp == ':') {
     16 		msg ("Service %s: removing header '%s'",
     17 		     activeservice->name, hdr);
     18 		free (h->header[i]);
     19 		h->header[i] = 0;
     20 	    }
     21 	}
     22 }