Kaartic Sivaraam wrote: > From: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@xxxxxxxx> > > 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.behar@xxxxxxxxx> > Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@xxxxxxxx> > Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@xxxxxxxxx> > --- > imap-send.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) Thanks! Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx> Is there a straightforward way to check that this behavior gets preserved in tests? Sincerely, Jonathan