/[monit]/monit/http/processor.c
ViewVC logotype

Diff of /monit/http/processor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by hauk, Fri Sep 19 22:07:47 2003 UTC revision 1.26 by hauk, Tue Sep 30 16:03:14 2003 UTC
# Line 255  void out_print(HttpResponse res, const c Line 255  void out_print(HttpResponse res, const c
255      memcpy(&res->outputbuffer[res->bufused], buf, need);      memcpy(&res->outputbuffer[res->bufused], buf, need);
256      res->bufused+= need;      res->bufused+= need;
257      res->outputbuffer[res->bufused]= 0;      res->outputbuffer[res->bufused]= 0;
258      free(buf);      FREE(buf);
259            
260    }    }
261        
# Line 287  void set_header(HttpResponse res, const Line 287  void set_header(HttpResponse res, const
287      HttpHeader n, p;      HttpHeader n, p;
288      for( n= p= res->headers; p; n= p, p= p->next) {      for( n= p= res->headers; p; n= p, p= p->next) {
289        if(!strcasecmp(p->name, name)) {        if(!strcasecmp(p->name, name)) {
290          free(p->value);          FREE(p->value);
291          p->value= xstrdup(value);          p->value= xstrdup(value);
292          destroy_entry(h);          destroy_entry(h);
293          return;          return;
# Line 608  static void send_response(HttpResponse r Line 608  static void send_response(HttpResponse r
608      if(res->bufused)      if(res->bufused)
609          socket_write(S, res->outputbuffer, res->bufused);          socket_write(S, res->outputbuffer, res->bufused);
610    
611      free(headers);      FREE(headers);
612            
613    }    }
614    
# Line 763  static int create_parameters(HttpRequest Line 763  static int create_parameters(HttpRequest
763                
764        if(socket_read(S, query_string, len) <= 0) {        if(socket_read(S, query_string, len) <= 0) {
765                    
766          free(query_string);          FREE(query_string);
767          return FALSE;          return FALSE;
768                    
769        }        }
# Line 800  static int create_parameters(HttpRequest Line 800  static int create_parameters(HttpRequest
800            
801    }    }
802    
803    if(alloc)free(query_string);    if(alloc)FREE(query_string);
804        
805    return TRUE;    return TRUE;
806        
# Line 841  static void destroy_HttpRequest(HttpRequ Line 841  static void destroy_HttpRequest(HttpRequ
841    
842    if(req) {    if(req) {
843            
844      free(req->method);      FREE(req->method);
845      free(req->url); /* req->pathinfo is freed with url */      FREE(req->url); /* req->pathinfo is freed with url */
846      free(req->protocol);      FREE(req->protocol);
847      if(req->headers)destroy_entry(req->headers);      if(req->headers)destroy_entry(req->headers);
848      if(req->params)destroy_entry(req->params);      if(req->params)destroy_entry(req->params);
849      free(req);      FREE(req);
850            
851    }    }
852        
# Line 860  static void destroy_HttpResponse(HttpRes Line 860  static void destroy_HttpResponse(HttpRes
860    
861    if(res) {    if(res) {
862            
863      free(res->outputbuffer);      FREE(res->outputbuffer);
864      if(res->headers) destroy_entry(res->headers);      if(res->headers) destroy_entry(res->headers);
865      free(res);      FREE(res);
866            
867    }    }
868        
# Line 883  static void destroy_entry(void *p) { Line 883  static void destroy_entry(void *p) {
883            
884    }    }
885    
886    free(h->name);    FREE(h->name);
887    free(h->value);    FREE(h->value);
888    free(h);    FREE(h);
889    
890  }  }
891    
# Line 952  static int basic_authenticate(HttpReques Line 952  static int basic_authenticate(HttpReques
952                
953      }      }
954            
955      free(cr);      FREE(cr);
956      free(credentials);      FREE(credentials);
957    
958    }    }
959        

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26