guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] web: uri-encode hexadecimal percent-encoding is now uppercas


From: Mark H Weaver
Subject: Re: [PATCH] web: uri-encode hexadecimal percent-encoding is now uppercase
Date: Thu, 02 May 2013 14:53:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi Aleix,

This patch looks good to me, except that I don't like the variable name
'num' for a string.  Actually, I'm not sure we need to bind that to a
variable at all.  How about just wrapping 'string-upcase' around the
call to 'number->string'?

      Thanks,
        Mark


> @@ -396,11 +396,12 @@ hexadecimal representation of the byte."
>                         (len (bytevector-length bv)))
>                    (let lp ((i 0))
>                      (if (< i len)
> -                        (let ((byte (bytevector-u8-ref bv i)))
> +                        (let* ((byte (bytevector-u8-ref bv i))
> +                               (num (number->string byte 16)))
>                            (display #\% port)
>                            (when (< byte 16)
>                              (display #\0 port))
> -                          (display (number->string byte 16) port)
> +                          (display (string-upcase num) port)
>                            (lp (1+ i))))))))
>            str)))
>        str))



reply via email to

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