temporary variable and free the buffer earlier.
-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.37 2008/04/17 14:53:29 fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.38 2008/04/18 05:17:18 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
*
* Revisions :
* $Log: urlmatch.c,v $
*
* Revisions :
* $Log: urlmatch.c,v $
+ * Revision 1.38 2008/04/18 05:17:18 fabiankeil
+ * Mark simplematch()'s parameters as immutable.
+ *
* Revision 1.37 2008/04/17 14:53:29 fabiankeil
* Move simplematch() into urlmatch.c as it's only
* used to match (old-school) domain patterns.
* Revision 1.37 2008/04/17 14:53:29 fabiankeil
* Move simplematch() into urlmatch.c as it's only
* used to match (old-school) domain patterns.
char *v[10]; /* XXX: Why 10? We should only need three. */
int n;
jb_err err;
char *v[10]; /* XXX: Why 10? We should only need three. */
int n;
jb_err err;
memset(http, '\0', sizeof(*http));
memset(http, '\0', sizeof(*http));
- if (strcmpic(v[0], "CONNECT") == 0)
- {
- is_connect = 1;
- }
-
err = parse_http_url(v[1], http, csp);
if (err)
{
err = parse_http_url(v[1], http, csp);
if (err)
{
/*
* Copy the details into the structure
*/
/*
* Copy the details into the structure
*/
- http->ssl = is_connect;
+ http->ssl = !strcmpic(v[0], "CONNECT");
http->cmd = strdup(req);
http->gpc = strdup(v[0]);
http->ver = strdup(v[2]);
http->cmd = strdup(req);
http->gpc = strdup(v[0]);
http->ver = strdup(v[2]);
if ( (http->cmd == NULL)
|| (http->gpc == NULL)
|| (http->ver == NULL) )
{
if ( (http->cmd == NULL)
|| (http->gpc == NULL)
|| (http->ver == NULL) )
{