]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x change.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 19 Aug 2004 15:33:02 +0000 (15:33 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 19 Aug 2004 15:33:02 +0000 (15:33 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@4379 7a7537e8-13f0-0310-91df-b6672ffda945

scheduler/client.c

index 44fad93adab531ace7e5f0fa2f2eae6766ef4d19..14b0c4e1454acb3c59321506c7b15f6420bbf388 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c,v 1.91.2.91 2004/08/06 13:57:05 mike Exp $"
+ * "$Id: client.c,v 1.91.2.92 2004/08/19 15:33:02 mike Exp $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -1308,13 +1308,12 @@ ReadClient(client_t *con)               /* I - Client to read from */
              else
              {
                SetStringf(&con->command, "%s/cgi-bin/jobs.cgi", ServerBin);
-
-               if (con->uri[5] == '/')
-                 SetString(&con->options, con->uri + 6);
-               else
-                 SetString(&con->options, con->uri + 5);
+                SetString(&con->options, con->uri + 5);
              }
 
+              if (con->options[0] == '/')
+               cups_strcpy(con->options, con->options + 1);
+
               if (!SendCommand(con, con->command, con->options))
              {
                if (!SendError(con, HTTP_NOT_FOUND))
@@ -1449,7 +1448,11 @@ ReadClient(client_t *con)                /* I - Client to read from */
               if (strncmp(con->uri, "/admin", 6) == 0)
              {
                SetStringf(&con->command, "%s/cgi-bin/admin.cgi", ServerBin);
-               SetString(&con->options, con->uri + 6);
+
+               if ((ptr = strchr(con->uri + 6, '?')) != NULL)
+                 SetStringf(&con->options, "admin%s", ptr);
+               else
+                 SetString(&con->options, "admin");
              }
               else if (strncmp(con->uri, "/printers", 9) == 0)
              {
@@ -3378,5 +3381,5 @@ CDSAWriteFunc(SSLConnectionRef connection,        /* I  - SSL/TLS connection */
 
 
 /*
- * End of "$Id: client.c,v 1.91.2.91 2004/08/06 13:57:05 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.92 2004/08/19 15:33:02 mike Exp $".
  */