4 ms·
Another alternative for something like this would be MIME multipart/mixed (https://en.wikipedia.org/wiki/MIME#Multipart_messages https://en.wikipedia.org/wiki/M
by adrianmonk 6y ago
Another alternative for something like this would be MIME multipart/mixed (https://en.wikipedia.org/wiki/MIME#Multipart_messages https://en.wikipedia.org/wiki/MIME#Multipart_messages).
That allows a text file to contain several other files. Plain text files can be included as-is (as text/plain), and binaries can be included (as application/octet-stream). Each file can be given a name through 'Content-Disposition: filename="foo.txt"'.
It can be hand-edited if you're reasonably careful. (Use boundaries, not Content-Length.)
And if any of the files would have been mergeable (with Git, etc.) as a separate file, it should also be pretty mergeable as a section of a MIME file. (Because it is included literally, and because presumably you give each one a unique filename, so the merge/diff algorithm has a unique Content-Disposition line to work with for each file.)
- breck 6y agoWould love to accept a PR adding a link to that. There really should be one. Thanks!