> > The client has to decrypt the metadata and find the content-type > > anyway. That's what clients do, they fetch the file, decrypt it, find the > > content-type, and then deal with the file appropriately based on what type > > of file it is. If the metadata is in an unreadable format, it won't be > specifies *when* FNP is used. Content-type is a convention, its not a > hard written law. I don't see why you have to have content-type to > determine anything. Its useful when you're dealing with real data, but > its optional.
Content type is optional. But you need it to determine what to do with the data. Most clients are going to launch a content-type specific module or viewer/player program determined by the content type. If data doesn't have a content type field then the best the client can do is save it to disk or display it as a text file. > > > I will also specify that if you have a special file, then it must be > > formatted in FNP in order for FNP clients to read it. But it can also be > > formated in XML in order for XML clients to read it. > You're missing the point. The client has to do a lot of work to determine > which form its in in your format. It's about as difficult in both schemes. In your scheme the client checks the length of the data. If it's 0, then metadata is in FNP. Otherwise it's in some unknown format. In my scheme it checks the Metadata-format field to see what format the metadata is in and handles it appropriately if it can knows how to handle that format. > > > I think a better solution would be explicitly state what kind of metadata > > was in the metadadata field. > How? You can't state what type of metadata is in the metadata field > without specifying a metadata form to store that representation? Thats a > circular nonsensical requirement. I'm talking about a Metata-format field in the message, just like the DataLength field. > > Metadata-format==0 (0 for FNP, 1 for XML, etc..) is faster. > > I'd prefer something more explicit such as Metadata-format=="FNP" which > > shouldn't take much more time and would be much more explicit. > But your specifying that that be stored along with the data, which is a > nice little security hole. Now people know what kind of metadata is being > used, which if it isn't common, reveals much about it. I don't see how whether the metadata is in FNP or XML format is a security concern. _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev
