[subversion:16] A few little trailing MATCHES/MATCHER bugs

  • From: TimBray@kenai.com
  • To: commits@mod-atom.kenai.com
  • Subject: [subversion:16] A few little trailing MATCHES/MATCHER bugs
  • Date: Fri, 31 Oct 2008 17:35:25 +0000 (GMT)

Repository: subversion
Revision:   16
Author:     tim.bray@sun.com
Date:       2008-10-31 17:35:21 UTC

Log Message:
-----------
A few little trailing MATCHES/MATCHER bugs

Modified Paths:
--------------
    src/mod_atom.c

Diffs:
-----
Index: src/mod_atom.c
===================================================================
--- src/mod_atom.c      (revision 15)
+++ src/mod_atom.c      (revision 16)
@@ -590,7 +590,7 @@
     void * writer;
 
     /* we only allow them on collection */
-    if (MATCHES(pub->patterns->collection, r->uri))
+    if (!MATCHES(pub->patterns->collection, r->uri))
         return HTTP_NOT_FOUND;
 
     /* the only ones we allow are start= and count=
@@ -641,7 +641,7 @@
     entry.pub = pub;
 
     /* has to be a collection */
-    if (!MATCHES(entry.pub->patterns->collection, r->uri) != 0) {
+    if (!MATCHES(entry.pub->patterns->collection, r->uri)) {
         /* grr... required by 2616.
          * How should I know which methods are allowed on their stupid
URI
          */
@@ -2749,10 +2749,9 @@
     /* if no slug from user */
     if (!slug) {
         if (e->xml) {
-            apr_xml_elem * title =
-               atom_xml_child(e->xml, e->xml->root, ATOM_NS, "title");
-           if (title)
-               slug = element_text(title, r->pool);
+            apr_xml_elem * t;
+           if ((t = atom_xml_child(e->xml, e->xml->root, ATOM_NS,
"title")))
+               slug = element_text(t, r->pool);
         }
     }
 
@@ -3741,7 +3740,7 @@
     if (suffix[0] == '/')
         suffix++;
 
-    if (MATCHES(sub_path_el, suffix))
+    if (!MATCHES(sub_path_el, suffix))
         return pub;
 
     /* don't want to screw with the incoming URI */


[subversion:16] A few little trailing MATCHES/MATCHER bugs

TimBray 10/31/2008
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close