On Sat, Aug 19, 2000 at 01:38:00AM -0500, Brandon wrote:
> 
> > In your proposal, the client has no way of knowing whether it has
> > freenet-special metadata, or regular metadata.  Your proposal requires
> > that the client examine every piece of metadata to find out if its
> > freenet-special before it acts on it.
> 
> That's actually exactly my point. In your proposal freenet-special and
> regular metadata are mixed together. In my proposal regular metadata comes
> first and then a trailing field and then the freenet-special metadata. So
> the two are separated. Both of our proposals have to exaxime every piece
> of metadata to find out if its freenet-special before acting. Your
> proposal requires it to look at the DataLength and mine requires it to
> look at the Content-Type field.

Ok, forget what I wrote before, I'm lost again. What is regular
metadata? What is the trailing field? Why does "Freenet specific
metadata" come after the trailing field?

What does Content-type have to with DataLength? DataLength is in the
message, Content-type is not. What we have is:

DataReply
UniqueID=0
HopsToLive=0
Depth=207
Source=lalala
DataLength=xxxx
Storable.Symmetric-cipher=foobar
Storable.Metadata-length=138
Data
.......................................
.......................................
.......................................
.......................................
.......................................

Where the dots represent DataLength bytes encrypted with
Storable.Symmetric-cipher. The first Storable.Metadata-length of these
bytes contain the metadata, but of course only when decrypted. So when
decrupted the entire data part might look like

Metadata
MIME.Content-type=mp3
MIME.Encoding=binary
Document.Title=My Favorite Whale calls
Doccument.Author=Melvin Blue
Data
.......................................
.......................................
.......................................
.......................................

where the dots are actual mp3 data. 

Note that DataLength and Metadata-length are in the actual
message. Content-type is not (and CAN'T be since it gives away the
contents).

> > Having the zero-length data convention (which would be a very very odd
> > thing for a normal document to have) makes it quite simple for the client
> > to distinguish freenet-special metadata from joe schmoe's metadata.
> 
> I think that a convention where it explicitly states hey, this right here
> is freenet-special metadata (Content-Type=freenet/special-metadata or what
> have you) is better than a convention which assumes that a very very odd
> situation signifies something special.

But how can you know the content-type before you parse the metadata????

\oskar

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to