Closed michaelrsweet closed 20 years ago
CUPS.org User: mike
OK, I think I've discovered the source of the problems; the current code does not rewrite the default printer URI the same way as the other printers; specifically, it forces a http: URL... :)
This will be fixed in CVS shortly...
CUPS.org User: mike
OK, see the attached patch for a fix; will be part of 1.1.20... :)
"str369.patch":
RCS file: /development/cvs/cups/cgi-bin/classes.c,v retrieving revision 1.25 diff -u -r1.25 classes.c --- classes.c 20 Jul 2003 03:35:03 -0000 1.25 +++ classes.c 7 Nov 2003 18:50:11 -0000 @@ -128,38 +128,12 @@
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
{
/*
url, sizeof(url)));
}
ippDelete(response);
RCS file: /development/cvs/cups/cgi-bin/ipp-var.c,v retrieving revision 1.39 diff -u -r1.39 ipp-var.c --- ipp-var.c 16 Oct 2003 19:13:41 -0000 1.39 +++ ipp-var.c 7 Nov 2003 18:50:11 -0000 @@ -26,6 +26,7 @@
/*
@@ -221,22 +339,7 @@ nameptr, / Pointer into name / value[16384], / Value(s) / *valptr; / Pointer into value */
/* Hexadecimal conversion characters */
DEBUG_printf(("
ippSetCGIVars(response=%p, filter_name=\"%s\", filter_value=\"%s\", prefix=\"%s\")\n", @@ -250,21 +353,6 @@ ippSetServerVersion();
/*
@@ -334,7 +422,7 @@ * attribute... */
if (!strcmp(name, "job_printer_uri"))
{ if ((valptr = strrchr(attr->values[0].string.text, '/')) == NULL) valptr = "unknown"; @@ -407,66 +495,9 @@ * Rewrite URIs... */
httpSeparate(attr->values[i].string.text, method, username,
break;
}
case IPP_TAG_STRING :
RCS file: /development/cvs/cups/cgi-bin/ipp-var.h,v retrieving revision 1.10 diff -u -r1.10 ipp-var.h --- ipp-var.h 20 Jul 2003 03:35:04 -0000 1.10 +++ ipp-var.h 7 Nov 2003 18:50:11 -0000 @@ -47,6 +47,7 @@ extern void ippGetAttributes(ipp_t request, const char directory, const char tmpl, const char lang); extern char ippGetTemplateDir(void); +extern char ippRewriteURL(const char , char , int); extern void ippSetServerVersion(void); extern void ippSetCGIVars(ipp_t , const char , const char , const char , int);
RCS file: /development/cvs/cups/cgi-bin/printers.c,v retrieving revision 1.29 diff -u -r1.29 printers.c --- printers.c 20 Jul 2003 03:35:04 -0000 1.29 +++ printers.c 7 Nov 2003 18:50:11 -0000 @@ -129,38 +129,12 @@
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL) {
/*
url, sizeof(url)));
}
ippDelete(response);
Version: 1.1.20rc2 CUPS.org User: steve.p.walsh.hp
OS is Solaris 8
Hope the following is of some help in reproducing this problem.
Attached file includes error_log extract access_log extract and saved source of printers page plus cupsd.conf.
You can see from the page source that localhost is explicitly defined for the Default Desination but all other printers are defined relative to current location.
Steps taken were:
open page https://UWSAU28W1001/ select Manage Printers
From then on ( not in logs ) if I select Default I am taken to http:://UWSAU28W1001:631, then select Printers followed by Default again I get http://localhost:631 and so on in a loop.