]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Strip trailing ? and / before checking for .ppd (<rdar://problem/23134506>)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 26 Oct 2015 18:07:32 +0000 (18:07 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 26 Oct 2015 18:07:32 +0000 (18:07 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12940 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.1.txt
scheduler/auth.c

index 80fb00333fa96ab720062648b5241d43bab4739b..061aa83920d26cd195b2b8457d828c06890ecb3c 100644 (file)
@@ -9,7 +9,8 @@ CHANGES IN CUPS V2.1.1
          <rdar://problem/23133393>, <rdar://problem/23133466>,
          <rdar://problem/23133833>, <rdar://problem/23133998>,
          <rdar://problem/23134228>, <rdar://problem/23134299>,
-         <rdar://problem/23134356>, <rdar://problem/23134415>)
+         <rdar://problem/23134356>, <rdar://problem/23134415>,
+         <rdar://problem/23134506>)
        - The cupsGetPPD* functions did not work with IPP printers (STR #4725)
        - Some older HP LaserJet printers need a delayed close when printing
          using the libusb-based USB backend (STR #4549)
index 14a224a189fc0390c7835601bb1fdf7461503e91..7c00c65b9d76ebcf6b07bd7357436085abc20bc7 100644 (file)
@@ -1492,6 +1492,12 @@ cupsdFindBest(const char   *path,        /* I - Resource path */
 
   strlcpy(uri, path, sizeof(uri));
 
+  if ((uriptr = strchr(uri, '?')) != NULL)
+    *uriptr = '\0';            /* Drop trailing query string */
+
+  if ((uriptr = uri + strlen(uri) - 1) > uri && *uriptr == '/')
+    *uriptr = '\0';            /* Remove trailing '/' */
+
   if (!strncmp(uri, "/printers/", 10) ||
       !strncmp(uri, "/classes/", 9))
   {
@@ -1505,12 +1511,6 @@ cupsdFindBest(const char   *path,        /* I - Resource path */
       *uriptr = '\0';
   }
 
-  if ((uriptr = strchr(uri, '?')) != NULL)
-    *uriptr = '\0';            /* Drop trailing query string */
-
-  if ((uriptr = uri + strlen(uri) - 1) > uri && *uriptr == '/')
-    *uriptr = '\0';            /* Remove trailing '/' */
-
  /*
   * Loop through the list of locations to find a match...
   */