Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > b2b31f8f12ce25fb0a2128354ea26724 > files > 55

cups-1.3.7-30.el5.src.rpm

diff -up cups-1.3.7/cgi-bin/ipp-var.c.str3022 cups-1.3.7/cgi-bin/ipp-var.c
--- cups-1.3.7/cgi-bin/ipp-var.c.str3022	2008-01-28 23:10:10.000000000 +0000
+++ cups-1.3.7/cgi-bin/ipp-var.c	2009-02-13 16:47:28.000000000 +0000
@@ -626,7 +626,7 @@ cgiRewriteURL(const char *uri,		/* I - C
 	      int        urlsize,	/* I - Size of URL buffer */
 	      const char *newresource)	/* I - Replacement resource */
 {
-  char			method[HTTP_MAX_URI],
+  char			scheme[HTTP_MAX_URI],
 			userpass[HTTP_MAX_URI],
 			hostname[HTTP_MAX_URI],
 			rawresource[HTTP_MAX_URI],
@@ -673,13 +673,13 @@ cgiRewriteURL(const char *uri,		/* I - C
   * Convert the URI to a URL...
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri, method, sizeof(method), userpass,
+  httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme), userpass,
                   sizeof(userpass), hostname, sizeof(hostname), &port,
 		  rawresource, sizeof(rawresource));
 
-  if (!strcmp(method, "ipp") ||
-      !strcmp(method, "http") ||
-      !strcmp(method, "https"))
+  if (!strcmp(scheme, "ipp") ||
+      !strcmp(scheme, "http") ||
+      !strcmp(scheme, "https"))
   {
     if (newresource)
     {
@@ -718,7 +718,9 @@ cgiRewriteURL(const char *uri,		/* I - C
     * Map local access to a local URI...
     */
 
-    if (!strcasecmp(hostname, "localhost") ||
+    if (!strcasecmp(hostname, "127.0.0.1") ||
+	!strcasecmp(hostname, "[::1]") ||
+	!strcasecmp(hostname, "localhost") ||
 	!strncasecmp(hostname, "localhost.", 10) ||
 	!strcasecmp(hostname, server) ||
 	!strcasecmp(hostname, servername))