?
Solved

Multipart/mixed MIME from Perl script (part2)

Posted on 1997-03-31
1
Medium Priority
?
223 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 200 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

Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

Question has a verified solution.

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

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

801 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