Link to home
Start Free TrialLog in
Avatar of mblazer
mblazer

asked on

Multipart/mixed MIME from Perl script (part2)

 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?
ASKER CERTIFIED SOLUTION
Avatar of pc012197
pc012197

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial