Repository navigation
Conversation
Prior to this commit this example failed with error 'Cannot APPEND with unknown input file size'. Bug: curl#1008 Reported-by: lukaszgn@users.noreply.github.com Closes #XXXX
|
@jay, thanks for your PR! By analyzing the annotation information on this pull request, we identified @captain-caveman2k and @bagder to be potential reviewers |
|
It seems like a fine fix to me, the question is however why it is needed. An upload should stop when a zero is returned from the read callback as that example already does, so while this fix makes the example run fine again it might also just mask a bug... |
|
The problem is I don't think you can do that with IMAP. I assume the example must have worked at some point and I reviewed its history but I don't see the size was ever set. IMAP send extra data seems to be knowing the continuation size and communicating it to the server beforehand, like COMMAND OPTIONS {data-byte-count}. For example right now an APPEND starts like this: More detail from IMAP RFC for APPEND: It doesn't define 'message literal' explicitly but earlier says: And literal is defined in String as: So I think we have to calculate the size beforehand. |
Ah, it has clearly been too long since I was hands-on with IMAP since I have totally forgotten about that detail. Then I'm in agreement with you. That's a necessary change of the example and we should even figure out somewhere where this is best documented... |
Prior to this commit this example failed with error
'Cannot APPEND with unknown input file size'.
Bug: #1008
Reported-by: lukaszgn@users.noreply.github.com
Closes #XXXX