Hi,

l...@gnu.org (Ludovic Courtès) writes:
> It turned out to come from a typo in Guile 2.2’s web client, now fixed
> here:
>
>   
> https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=7d0d9e2c25c1e872cfc7d14ab5139915f1813d56

[...]

> diff --git a/module/web/http.scm b/module/web/http.scm
> index 993b50e..62f0624 100644
> --- a/module/web/http.scm
> +++ b/module/web/http.scm
> [...]
> @@ -1158,7 +1158,7 @@ three values: the method, the URI, and the version."
>          (put-symbol port scheme)
>          (put-string port "://")
>          (cond
> -         ((host string-index #\:)
> +         ((string-index host #\:)
>            (put-char #\[ port)
>            (put-string port host
>            (put-char port #\])))

There are 4 typos in the cond clause above, all introduced in this
commit:

  
https://git.savannah.gnu.org/cgit/guile.git/commit/?id=96b994b6f815747ce2548123cc996d8132bd4781

which includes:

-         ((string-index host #\:)
-          (display #\[ port)
-          (display host port)
-          (display #\] port))
+         ((host string-index #\:)
+          (put-char #\[ port)
+          (put-string port host
+          (put-char port #\])))

In addition to the typo you fixed:

* The first call to 'put-char' above has its arguments reversed.
* The following line is missing its ')'.
* The last line has an extra ')'.

       Mark

Reply via email to