1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 07:17:35 +00:00

LibIMAP: Wait for a full IMAP response before parsing

We're now sniffing the incoming data to verify the server has sent a
full response, instead of passing partial data to our IMAP parser.
Our parser really can't handle partial input very well, so for the time
being, this heuristic does a much better job of verifying we have full
response before parsing.
It doesn't yet handle unprompted untagged reponses, nor the
"continuation request" responses that start with a `+`, but we don't
fully support those yet.
This commit is contained in:
Valtteri Koskivuori 2023-07-31 18:04:39 +03:00 committed by Andrew Kaster
parent 0b7e18177b
commit 34adf9eeae
2 changed files with 23 additions and 2 deletions

View file

@ -63,6 +63,7 @@ private:
void setup_callbacks();
ErrorOr<void> on_ready_to_receive();
bool verify_response_is_complete();
ErrorOr<void> handle_parsed_response(ParseStatus&& parse_status);
ErrorOr<void> send_next_command();