Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in response: imapwire: expected CRLF, got " " #540

Closed
k773 opened this issue Aug 18, 2023 · 2 comments · Fixed by #541
Closed

in response: imapwire: expected CRLF, got " " #540

k773 opened this issue Aug 18, 2023 · 2 comments · Fixed by #541
Labels
client non-standard Interoperability with software violating the specs

Comments

@k773
Copy link

k773 commented Aug 18, 2023

Code to reproduce:

func TestOutlook(t *testing.T) {
	client, e := imapclient.DialTLS("outlook.office365.com:993", &imapclient.Options{DebugWriter: os.Stderr})
	if e != nil {
		panic(e)
	}
	if e = client.Login(username, password).Wait(); e != nil {
		panic(e)
	}
	if _, e = client.Select("INBOX", nil).Wait(); e != nil {
		panic(e)
	}
	if _, e = client.Status("INBOX", &imap.StatusOptions{NumMessages: true}).Wait(); e != nil {
		panic(e)  // <- panics here
	}
}

This code produces the following error:

panic: in response: imapwire: expected CRLF, got " " [recovered]
	panic: in response: imapwire: expected CRLF, got " "

From the debug output I can see that there is a space symbol after the ')' (second line), which go-imap does not expect:

T5 STATUS INBOX (MESSAGES)
* STATUS Inbox (MESSAGES 1) 
T5 OK STATUS completed.
@emersion
Copy link
Owner

Does #541 help?

@k773
Copy link
Author

k773 commented Aug 18, 2023

Yes, it does. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client non-standard Interoperability with software violating the specs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants