-
Notifications
You must be signed in to change notification settings - Fork 283
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
Add support for parsing of incomplete base64 and QP MIME parts #224
Conversation
Could you post some example about how to use it? I feel like we might want to return some different error code when more data are required, only in the case of parsing partial data. Thanks! |
My use case is loading big attachment by imap_fetch_range. In pseudocode:
|
I think that return the MAILIMAP_ERROR_NEEDS_MORE_DATA in this case is not needed. It is not an error, it is normal scenario in handling of data stream. But I can add this, if need. |
No need to add the return code. Your example is helpful. I have some comments though. |
} | ||
written += 3; | ||
} | ||
} | ||
|
||
if (chunk_index != 0) { | ||
if (chunk_index != 0 && partial == FALSE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could change partial == FALSE
to !partial
?
ping? |
I'm a little busy right now. In the near future I will proceed. |
0b4ee39
to
d6b3020
Compare
Done. |
@@ -1837,6 +1860,9 @@ int mailmime_quoted_printable_body_parse(const char * message, size_t length, | |||
|
|||
case '\r': | |||
if (cur_token + 2 >= length) { | |||
if (!partial) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean if (partial)
here?
or you did you change a behavior?
or did you fix an issue?
I just have a question. |
d6b3020
to
f4140b8
Compare
it was a missed change of behavior. I deleted those lines. |
Add support for parsing of incomplete base64 and QP MIME parts
Thanks a lot for that contribution! |
It useful when MIME part is requested and loaded to memory by small chunks.