/*
- * "$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.
*
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))
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)
{
/*
- * 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 $".
*/