Multipart/mixed in IE

Posted on 1998-05-01
Last Modified: 2006-11-17
I have the following code sample written in C for a CGI.  I want to download a file (a zipped file for the same of argument in this example) and at the same time show a new page.
#include <stdio.h>
#include <stdlib.h>

void main()
      printf("Content-type: application/x-compressed\n\n");
      printf("this is the first data\n\n");
      printf("Content-type: text/plain\n\n");
      printf("this is the display data\n\n");

This all works fine when running any Netscape browser than I've tried.  It prompts me to save the file and then displays the new page.

Different story in IE... it shows the following in the browser:
Content-type: application/x-compressed

this is the first data

Content-type: text/plain

this is the display data


It doesn't parse the multipart stream.

1.  Does IE support the multipart/mixed MIME type?
2.  If so, what's wrong with my code?
3.  If not, what other options do I have to accomplish the same thing.  I've thought about displaying the web page first with a META refresh tag set to 0 seconds that points to the file, but this (for security reasons) is not at all a good solution.

Any help would be greatly appreciated.
Question by:clc050198

Expert Comment

ID: 1842669
Shoulnd there be a space after the : ?
like this:
printf("Content-type: multipart/mixed;boundary=--abcdefg\n\n");


Author Comment

ID: 1842670
I have one reference that says yes, and one that says no.  Either way it doesn't work.
LVL 28

Expert Comment

ID: 1842671
Answer to question nr 1:
No, IE does not support the multipart/mixed MIME type

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.


Expert Comment

ID: 1842672
There seems to be a bug in IE 4.0 with this. It worked fine for me on IE 4.01, when I used a mime-type of bougs/file.

Author Comment

ID: 1842673
percyn.... what server were you using to get it to work with IE4.01?  For me it doesn't work under 4.01 or 4.0.  I'm using IIS as a server.

Expert Comment

ID: 1842674
IIS 4.0

Accepted Solution

raky earned 100 total points
ID: 1842675
Try to put quotes in your boundary string like this :

Content-Type: multipart/mixed;

See you

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Form Submit falis 6 33
Add image to into animation on website template 1 27
Html5 Index on a table 7 25
Hide cell in a table 2 9
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

805 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