-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.33 2008/04/12 14:03:13 fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.34 2008/04/13 13:32:07 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
*
* Revisions :
* $Log: urlmatch.c,v $
+ * Revision 1.34 2008/04/13 13:32:07 fabiankeil
+ * Factor URL pattern compilation out of create_url_spec().
+ *
* Revision 1.33 2008/04/12 14:03:13 fabiankeil
* Remove an obvious comment and improve another one.
*
* function. If this function succeeds, the
* buffer is copied to url->spec. If this
* function fails, the contents of the buffer
- * are lost forever. XXX: Why is this const?
+ * are lost forever.
*
* Returns : JB_ERR_OK - Success
* JB_ERR_MEMORY - Out of memory
* written to system log)
*
*********************************************************************/
-jb_err create_url_spec(struct url_spec * url, const char * buf)
+jb_err create_url_spec(struct url_spec *url, char *buf)
{
assert(url);
assert(buf);
#ifndef URLMATCH_H_INCLUDED
#define URLMATCH_H_INCLUDED
-#define URLMATCH_H_VERSION "$Id: urlmatch.h,v 1.8 2007/09/02 15:31:20 fabiankeil Exp $"
+#define URLMATCH_H_VERSION "$Id: urlmatch.h,v 1.9 2008/04/08 16:07:39 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.h,v $
*
* Revisions :
* $Log: urlmatch.h,v $
+ * Revision 1.9 2008/04/08 16:07:39 fabiankeil
+ * Make it harder to mistake url_match()'s
+ * second parameter for an url_spec.
+ *
* Revision 1.8 2007/09/02 15:31:20 fabiankeil
* Move match_portlist() from filter.c to urlmatch.c.
* It's used for url matching, not for filtering.
extern int url_match(const struct url_spec *pattern,
const struct http_request *http);
-extern jb_err create_url_spec(struct url_spec * url, const char * buf);
+extern jb_err create_url_spec(struct url_spec *url, char *buf);
extern void free_url_spec(struct url_spec *url);
extern int match_portlist(const char *portlist, int port);