Solved

Multipart/mixed MIME from Perl script (part2)

Posted on 1997-03-31
1
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

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…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

728 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