guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-7-g6fe2803


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-7-g6fe2803
Date: Thu, 02 May 2013 21:14:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=6fe2803b45fbbd676625c9d665151e5a8a57aca5

The branch, stable-2.0 has been updated
       via  6fe2803b45fbbd676625c9d665151e5a8a57aca5 (commit)
      from  e006d87ba5942b6e49b39b951413dfe63785a398 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6fe2803b45fbbd676625c9d665151e5a8a57aca5
Author: Aleix Conchillo Flaque <address@hidden>
Date:   Thu May 2 12:13:31 2013 -0700

    web: uri-encode hexadecimal percent-encoding is now uppercase
    
    * module/web/uri.scm (uri-encode): the hexadecimal percent-encoding %HH
      is now uppercased as suggested by RFC3986:
    
          "For consistency, URI producers and normalizers should use
           uppercase hexadecimal digits for all percent-encodings."
    
    * test-suite/tests/web-uri.test ("encode"): update tests.

-----------------------------------------------------------------------

Summary of changes:
 module/web/uri.scm            |   11 ++++++-----
 test-suite/tests/web-uri.test |    4 ++--
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/module/web/uri.scm b/module/web/uri.scm
index 7fe0100..3ab820d 100644
--- a/module/web/uri.scm
+++ b/module/web/uri.scm
@@ -6,12 +6,12 @@
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
 ;;;; version 3 of the License, or (at your option) any later version.
-;;;; 
+;;;;
 ;;;; This library is distributed in the hope that it will be useful,
 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 ;;;; Lesser General Public License for more details.
-;;;; 
+;;;;
 ;;;; You should have received a copy of the GNU Lesser General Public
 ;;;; License along with this library; if not, write to the Free Software
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
@@ -20,7 +20,7 @@
 ;;; Commentary:
 
 ;; A data type for Universal Resource Identifiers, as defined in RFC
-;; 3986. 
+;; 3986.
 
 ;;; Code:
 
@@ -382,7 +382,7 @@ The default character set includes alphanumerics from 
ASCII, as well as
 the special characters ‘-’, ‘.’, ‘_’, and ‘~’.  Any other 
character will
 be percent-encoded, by writing out the character to a bytevector within
 the given ENCODING, then encoding each byte as ‘%HH’, where HH is the
-hexadecimal representation of the byte."
+uppercase hexadecimal representation of the byte."
   (define (needs-escaped? ch)
     (not (char-set-contains? unescaped-chars ch)))
   (if (string-index str needs-escaped?)
@@ -400,7 +400,8 @@ hexadecimal representation of the byte."
                           (display #\% port)
                           (when (< byte 16)
                             (display #\0 port))
-                          (display (number->string byte 16) port)
+                          (display (string-upcase (number->string byte 16))
+                                   port)
                           (lp (1+ i))))))))
           str)))
       str))
diff --git a/test-suite/tests/web-uri.test b/test-suite/tests/web-uri.test
index 3f6e7e3..3d14d9d 100644
--- a/test-suite/tests/web-uri.test
+++ b/test-suite/tests/web-uri.test
@@ -259,5 +259,5 @@
 
 (with-test-prefix "encode"
   (pass-if (equal? "foo%20bar" (uri-encode "foo bar")))
-  (pass-if (equal? "foo%0a%00bar" (uri-encode "foo\n\x00bar")))
-  (pass-if (equal? "%3c%3e%5c%5e" (uri-encode "<>\\^"))))
+  (pass-if (equal? "foo%0A%00bar" (uri-encode "foo\n\x00bar")))
+  (pass-if (equal? "%3C%3E%5C%5E" (uri-encode "<>\\^"))))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]