Kaartic Sivaraam wrote:

> From: Nicolas Morey-Chaisemartin <nmoreychaisemar...@suse.com>
>
> When trying to send a patch using 'imap-send' with 'curl' and the
> following configuration:
>
> [imap]
>       folder = "[Gmail]/Drafts"
>       host = imaps://imap.gmail.com
>       port = 993
>       sslverify = false
>
> results in the following error,
>
>     curl_easy_perform() failed: URL using bad/illegal format or missing URL
>
> This is a consequence of not URI-encoding the folder portion of
> the URL which contains characters such as '[' which are not
> allowed in a URI. According to RFC3986, these characters should be
> URI-encoded.
>
> So, URI-encode the folder before adding it to the URI to ensure it doesn't
> contain characters that aren't allowed in a URI.
>
> Reported-by: Doron Behar <doron.be...@gmail.com>
> Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemar...@suse.com>
> Signed-off-by: Kaartic Sivaraam <kaartic.sivar...@gmail.com>
> ---
>  imap-send.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Thanks!
Reviewed-by: Jonathan Nieder <jrnie...@gmail.com>

Is there a straightforward way to check that this behavior gets
preserved in tests?

Sincerely,
Jonathan

Reply via email to