From: msweet Date: Thu, 5 Dec 2013 19:57:43 +0000 (+0000) Subject: Fix tel: URIs () X-Git-Tag: release-2.1.4~16^2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1de635a20fca4020f266fe1112158a0e0b5be86;p=thirdparty%2Fcups.git Fix tel: URIs () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11445 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index fadfac8390..9b0ea2df9a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 () - Japanese PPDs using with the Shift-JIS encoding did not work () + - "tel:" URIs incorrectly had slashes () CHANGES IN CUPS V1.7.0 diff --git a/cups/http-support.c b/cups/http-support.c index 0678c272ee..cf4cb8b31b 100644 --- a/cups/http-support.c +++ b/cups/http-support.c @@ -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; /* diff --git a/cups/testhttp.c b/cups/testhttp.c index a1fbc37aaf..a197a2e4b0 100644 --- a/cups/testhttp.c +++ b/cups/testhttp.c @@ -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 },