]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix tel: URIs (<rdar://problem/15418463>)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 5 Dec 2013 19:57:43 +0000 (19:57 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 5 Dec 2013 19:57:43 +0000 (19:57 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11445 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES.txt
cups/http-support.c
cups/testhttp.c

index fadfac8390d8d4904e4fe8a4fcfe13ecb848e7dc..9b0ea2df9a5d84134b9fca0b36697ffeaa45f27f 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES.txt - 1.7.1 - 2013-11-06
+CHANGES.txt - 1.7.1 - 2013-12-05
 --------------------------------
 
 CHANGES IN CUPS V1.7.1
@@ -21,6 +21,7 @@ CHANGES IN CUPS V1.7.1
          cups-filters package installed (<rdar://problem/14292998>)
        - Japanese PPDs using with the Shift-JIS encoding did not work
          (<rdar://problem/15427759>)
+       - "tel:" URIs incorrectly had slashes (<rdar://problem/15418463>)
 
 
 CHANGES IN CUPS V1.7.0
index 0678c272eecd08c996c0d0aed512a30af184194f..cf4cb8b31b7d3528ba91a2b14278f7ae7d95ef7a 100644 (file)
@@ -206,10 +206,10 @@ httpAssembleURI(
   if (!ptr)
     goto assemble_overflow;
 
-  if (!strcmp(scheme, "mailto"))
+  if (!strcmp(scheme, "mailto") || !strcmp(scheme, "tel"))
   {
    /*
-    * mailto: only has :, no //...
+    * mailto: and tel: only have :, no //...
     */
 
     if (ptr < end)
@@ -220,7 +220,7 @@ httpAssembleURI(
   else
   {
    /*
-    * Schemes other than mailto: all have //...
+    * Schemes other than mailto: and tel: all have //...
     */
 
     if ((ptr + 2) < end)
@@ -1080,7 +1080,7 @@ httpSeparateURI(
     *port = 515;
   else if (!strcmp(scheme, "socket"))  /* Not yet registered with IANA... */
     *port = 9100;
-  else if (strcmp(scheme, "file") && strcmp(scheme, "mailto"))
+  else if (strcmp(scheme, "file") && strcmp(scheme, "mailto") && strcmp(scheme, "tel"))
     status = HTTP_URI_STATUS_UNKNOWN_SCHEME;
 
  /*
index a1fbc37aaf9bc5c18d98047eb34e36e2a4a35b47..a197a2e4b040731608d4c03093109495d7a6b458 100644 (file)
@@ -1,22 +1,18 @@
 /*
  * "$Id$"
  *
- *   HTTP test program for CUPS.
+ * HTTP test program for CUPS.
  *
- *   Copyright 2007-2013 by Apple Inc.
- *   Copyright 1997-2006 by Easy Software Products.
+ * Copyright 2007-2013 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products.
  *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   main() - Main entry.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 /*
@@ -105,6 +101,9 @@ static uri_test_t   uri_tests[] =   /* URI test data */
                          { HTTP_URI_STATUS_OK, "socket://192.168.1.1:9101/",
                            "socket", "", "192.168.1.1", "/", 9101, 9101,
                            HTTP_URI_CODING_MOST  },
+                         { HTTP_URI_STATUS_OK, "tel:8005551212",
+                           "tel", "", "", "8005551212", 0, 0,
+                           HTTP_URI_CODING_MOST  },
                          { HTTP_URI_STATUS_OK, "ipp://username:password@[v1.fe80::200:1234:5678:9abc+eth0]:999/ipp",
                            "ipp", "username:password", "fe80::200:1234:5678:9abc%eth0", "/ipp", 999, 999,
                            HTTP_URI_CODING_MOST  },