HP Internet Printer Connection Software doesn't work with cups
Alexander Elbs
alex at segv.de
Fri Jul 20 06:59:59 PDT 2007
The HP printing tool sends as printer URI this to the cups server:
hostname/printers/some_printer
it leaves out http:// or ipp://
with this patch (to 1.2.7) it works for us:
--- cups/http-support.c.orig 2007-07-20 14:04:46.000000000 +0200
+++ cups/http-support.c 2007-07-20 14:05:56.000000000 +0200
@@ -867,7 +867,8 @@
status = HTTP_URI_OK;
- if (!strncmp(uri, "//", 2))
+ if (!strncmp(uri, "//", 2) ||
+ (*uri != '/' && strstr(uri, "//") == NULL))
{
/*
* Workaround for HP IPP client bug...
@@ -930,13 +931,17 @@
* Now see if we have a hostname...
*/
- if (!strncmp(uri, "//", 2))
+ if (!strncmp(uri, "//", 2) ||
+ (*uri != '/' && strstr(uri, "//") == NULL))
{
/*
* Yes, extract it...
*/
- uri += 2;
+ if (!strncmp(uri, "//", 2))
+ {
+ uri += 2;
+ }
/*
* Grab the username, if any...
More information about the cups-devel
mailing list