Well, the whole situation is described in my previous question with the same name, that is now successfully solved. Thanks to Fordream, and all who took care.
Now I need one trick. So:
I use multipart/mixed MIME message to return some file as octet-stream to my user's disk. OK.
Multipart's parts (sorry ;-)) are delimited with some string that is boundary. This string + 2 leading dashes -- delimites parts of a message. It's theory. And practice two.
But in fact my file is ASCII and I use octet-stream only to prevent it from displaying in browser's window. And it (file) sometimes has strings that begin with few dashes. Sure, multipart mechanizm crashes in this case.
The only thing that I could devise was to add some(any) first symbol to each line. It works, but it's dirty solution, and in fact it forces me to run some bat-file on client side to remove those first symbols.
It seems that we have nothing to do here. Downloading files usualy contain PGP-messages that always have:
-------BEGIN PGP MESSAGE ----------- inside. You got it?
On the other side, to decrypt PGP-message I HAVE TO remove added symbols. It's OK, but as I've said it's dirty solution.
May be some kind of multipart encoding (I checked some variants) will hide dashes?
Have any ideas?