Author: adrian.chadd
Date: Mon Feb  2 12:04:44 2009
New Revision: 13791

Modified:
    branches/LUSCA_HEAD/src/acl.c

Log:
Remove strBuf() call



Modified: branches/LUSCA_HEAD/src/acl.c
==============================================================================
--- branches/LUSCA_HEAD/src/acl.c       (original)
+++ branches/LUSCA_HEAD/src/acl.c       Mon Feb  2 12:04:44 2009
@@ -736,10 +736,16 @@
      *hd = q;
  }

+/*
+ * XXX the temporary string copy is because of the regex engines'
+ * XXX requirement for NUL terminated strings. Migrating to PCRE
+ * XXX would fix this.
+ */
  static int
  aclMatchHeader(acl_hdr_data * hdrs, const HttpHeader * hdr)
  {
      acl_hdr_data *hd;
+    const char *s;
      for (hd = hdrs; hd; hd = hd->next) {
        int ret;
        String header;
@@ -749,7 +755,9 @@
            header = httpHeaderGetByName(hdr, hd->hdr_name);
        if (strIsNull(header))
            continue;
-       ret = aclMatchRegex(hd->reglist, strBuf(header));
+        s = stringDupToC(&header);
+       ret = aclMatchRegex(hd->reglist, s);
+       safe_free(s);
        stringClean(&header);
        if (ret)
            return 1;

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to