From: Taylor R Campbell Date: Sun, 24 Oct 2010 01:21:02 +0000 (+0000) Subject: Kludge to fix pct-encoding of authority part of IMAP URLs in IMAIL. X-Git-Tag: 20101212-Gtk~30 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4391ea04174182aa6d4c0a65ae80c80de5b7fb4a;p=mit-scheme.git Kludge to fix pct-encoding of authority part of IMAP URLs in IMAIL. --- diff --git a/src/imail/imail-imap.scm b/src/imail/imail-imap.scm index 333b1d2c7..e8c4bb15f 100644 --- a/src/imail/imail-imap.scm +++ b/src/imail/imail-imap.scm @@ -112,16 +112,20 @@ USA. (define (make-imap-url-string url mailbox) (if (not mailbox) (error:wrong-type-argument mailbox string 'MAKE-IMAP-URL-STRING)) - (string-append "//" - (let ((user-id (imap-url-user-id url))) - (if (string=? user-id (current-user-name)) - "" - (string-append (url:encode-string user-id) "@"))) - (string-downcase (imap-url-host url)) - (let ((port (imap-url-port url))) - (if (= port 143) - "" - (string-append ":" (number->string port)))) + (string-append (call-with-output-string + (lambda (port) + (write-uri-authority + (make-uri-authority + (let ((user-id (imap-url-user-id url))) + (if (string=? user-id (current-user-name)) + #f + user-id)) + (string-downcase (imap-url-host url)) + (let ((port (imap-url-port url))) + (if (= port 143) + #f + port))) + port))) (if (or (string=? mailbox "") (string=? mailbox "/")) mailbox