Solved

Multipart/mixed MIME from Perl script (part2)

Posted on 1997-03-31
1
218 Views
Last Modified: 2013-12-25
 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?
0
Comment
Question by:mblazer
1 Comment
 
LVL 3

Accepted Solution

by:
pc012197 earned 100 total points
ID: 1827860
You could use

Content-Transfer-Encoding: base64 for the ASCII-parts of your message. It would be stripped automatically by the client browser.
If you have MIME tools on your system, you can base64-encode files with the command 'mmencode', I think.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question