apple / swift-nio-imap

A Swift project that provides an implementation of the IMAP4rev1 protocol, built upon SwiftNIO.
Apache License 2.0
97 stars 13 forks source link

Fix IMAP Proxy channel pipeline handlers - fixes #764 #765

Open Aloisius opened 2 weeks ago

Aloisius commented 2 weeks ago

This changes the channel handlers for the Proxy to match what the IMAPServerHandler and IMAPClientHandler now expect.

Motivation:

The Proxy command currently is unable to proxy IMAP connections.

Modifications:

This modifies the MailClientToProxyHandler's InboundIn to expect CommandStreamPart rather than SynchronizedCommand, modfiies ProxyToMailServerHandler.channelRead to write a Response rather than a ByteBuffer and modifies Proxy/main to add the ByteToMessageHandler(FrameDecoder()) channel handler before the IMAPServerHandler(), so it gets a FramingResult as input.

Result:

Proxy should successfully proxy IMAP connections.

fixes #764

Lukasa commented 2 weeks ago

@swift-server-bot test this please

Lukasa commented 2 weeks ago

Looks like there are a couple of compile errors there.