git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@4219
7a7537e8-13f0-0310-91df-
b6672ffda945
CHANGES IN CUPS V1.1.21rc2
CHANGES IN CUPS V1.1.21rc2
+ - The scheduler didn't handle HTTP GET form data
+ properly (STR #744)
- The pstops filter now makes sure that the prolog code
is sent before the setup code (STR #776)
- The pstops filter now handles print files that
- The pstops filter now makes sure that the prolog code
is sent before the setup code (STR #776)
- The pstops filter now handles print files that
- * "$Id: client.c,v 1.91.2.83 2004/06/29 02:45:24 mike Exp $"
+ * "$Id: client.c,v 1.91.2.84 2004/06/29 04:31:03 mike Exp $"
*
* Client routines for the Common UNIX Printing System (CUPS) scheduler.
*
*
* Client routines for the Common UNIX Printing System (CUPS) scheduler.
*
int i; /* Looping var */
int pid; /* Process ID */
char *commptr; /* Command string pointer */
int i; /* Looping var */
int pid; /* Process ID */
char *commptr; /* Command string pointer */
+ char *query; /* Query string pointer */
char *uriptr; /* URI string pointer */
int fd; /* Looping var */
int fds[2]; /* Pipe FDs */
char *uriptr; /* URI string pointer */
int fd; /* Looping var */
int fds[2]; /* Pipe FDs */
for (commptr = argbuf, argc = 1; *commptr != '\0' && argc < 99; commptr ++)
if (*commptr == ' ' || *commptr == '+')
for (commptr = argbuf, argc = 1; *commptr != '\0' && argc < 99; commptr ++)
if (*commptr == ' ' || *commptr == '+')
+
+ /*
+ * Copy query data, if any, from arguments...
+ */
+
+ if (argc == 2 && strchr(commptr, '=') && con->operation == HTTP_GET)
+ query = strdup(commptr);
+
commptr --;
}
else if (*commptr == '%' && isxdigit(commptr[1] & 255) &&
commptr --;
}
else if (*commptr == '%' && isxdigit(commptr[1] & 255) &&
cups_strcpy(commptr + 1, commptr + 3);
}
cups_strcpy(commptr + 1, commptr + 3);
}
- else if (*commptr == '?')
- break;
LogMessage(L_DEBUG2, "argv[%d] = \"%s\"", i, argv[i]);
envp[envc ++] = "REQUEST_METHOD=GET";
LogMessage(L_DEBUG2, "argv[%d] = \"%s\"", i, argv[i]);
envp[envc ++] = "REQUEST_METHOD=GET";
{
/*
* Add GET form variables after ?...
*/
{
/*
* Add GET form variables after ?...
*/
- *commptr++ = '\0';
-
- snprintf(query_string, sizeof(query_string), "QUERY_STRING=%s", commptr);
+ snprintf(query_string, sizeof(query_string), "QUERY_STRING=%s", query);
envp[envc ++] = query_string;
envp[envc ++] = query_string;
- * End of "$Id: client.c,v 1.91.2.83 2004/06/29 02:45:24 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.84 2004/06/29 04:31:03 mike Exp $".