Derrick Stolee <derrickstolee@xxxxxxxxxx> writes: >> How does a client tell which one it got? Do we register mimetype >> with iana to use for these two types of files, and have the HTTP >> downloader to use the information? > > My implementation is much dumber than that: it first attempts to > parse the file as a bundle (looking for a bundle header) and then > attempts to parse it as a config file after that. If neither > succeed, then an error is thrown. I think that is probably the best implementation after all. We cannot trust what the other side tells us. "They claimed that this is a bundle file and not a table-of-contents, and it does look like one, but it may be corrupt or even malicious file that may look like a bundle file on surface, so let's carefully examine it" ought to be the attitude the receiving side has towards the incoming data. Thanks.