[haiku-development] Re: [GSoC proposal] IMAP FS - A few queries

  • From: Donn Cave <donn@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 14 Apr 2011 14:26:08 -0700 (PDT)

Quoth Anshul Singhle <xashck@xxxxxxxxx>,
...
>> Though since the FS maps message to file, as long as it does so
>> consistently, and publishes what it's doing, there should be no
>> problem, right?  I mean, if the `plain' part of your message is
>> 2137 bytes and the `html' part is 2904 bytes, the FS can compute
>> offsets from this and enforce them.
>
> I think what we are going for here is getting the part of the message
> without first storing it in the FS.
>
> The newer IMAP Fetch command allows us to do this. See
> http://objectmix.com/imap/201762-need-help-fetching-multipart-exchange.html.
> Read the last comment
>
> You need to fetch the bodystructure first. After parsing the result you can
> fetch the various parts as BODY[1] , BODY[2.1] based on the bodystructure

Yes, that's true, but let me say again, to support this offset
notion, the FS must enforce it.  I would like to think that, for
example, the sum of the part sizes plus header would add up to
the total RFC822.SIZE of the message, but some server implementation
is bound to falsify that assumption, and you have to make up for it.
You will need the embedded MIME headers and separators, and it's up
to you to make sure that the offsets you compute before you've seen
the data leave room for that.

        Donn

(PS.  FETCH by part isn't really very new - in case someone would
be concerned that we're exploring the cutting edge frontier of IMAP -
not at all.)

Other related posts: