/[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.32 by hauk, Fri Nov 21 16:25:24 2003 UTC revision 1.33 by hauk, Fri Nov 21 16:47:12 2003 UTC
# Line 338  void set_content_type(HttpResponse res, Line 338  void set_content_type(HttpResponse res,
338   * @param name Header name to lookup the value for   * @param name Header name to lookup the value for
339   * @return The value of the specified header, NULL if not found   * @return The value of the specified header, NULL if not found
340   */   */
341  char *get_header(HttpRequest req, const char *name) {  const char *get_header(HttpRequest req, const char *name) {
342    
343    HttpHeader p;    HttpHeader p;
344    
# Line 346  char *get_header(HttpRequest req, const Line 346  char *get_header(HttpRequest req, const
346            
347      if(!strcasecmp(p->name, name)) {      if(!strcasecmp(p->name, name)) {
348                
349          return xstrdup(p->value);          return (p->value);
350    
351      }      }
352            
# Line 363  char *get_header(HttpRequest req, const Line 363  char *get_header(HttpRequest req, const
363   * @param name The request parameter key to lookup the value for   * @param name The request parameter key to lookup the value for
364   * @return The value of the specified parameter, or NULL if not found   * @return The value of the specified parameter, or NULL if not found
365   */   */
366  char *get_parameter(HttpRequest req, const char *name) {  const char *get_parameter(HttpRequest req, const char *name) {
367    
368    HttpParameter p;    HttpParameter p;
369    
# Line 371  char *get_parameter(HttpRequest req, con Line 371  char *get_parameter(HttpRequest req, con
371            
372      if(!strcasecmp(p->name, name)) {      if(!strcasecmp(p->name, name)) {
373                
374          return xstrdup(p->value);          return (p->value);
375    
376      }      }
377            
# Line 911  static int is_authenticated(HttpRequest Line 911  static int is_authenticated(HttpRequest
911  static int basic_authenticate(HttpRequest req) {  static int basic_authenticate(HttpRequest req) {
912    
913    int rv= FALSE;    int rv= FALSE;
914    char *credentials= get_header(req, "Authorization");    const char *credentials= get_header(req, "Authorization");
915    
916    if(credentials) {    if(credentials) {
917    
# Line 958  static int basic_authenticate(HttpReques Line 958  static int basic_authenticate(HttpReques
958      }      }
959            
960      FREE(cr);      FREE(cr);
     FREE(credentials);  
961    
962    }    }
963        

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

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