Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Multipart/mixed in IE

Posted on 1998-05-01
7
Medium Priority
?
429 Views
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:multipart/mixed;boundary=--abcdefg\n\n");
      printf("----abcdefg\n");
      printf("Content-type: application/x-compressed\n\n");
      printf("this is the first data\n\n");
      printf("----abcdefg\n");
      printf("Content-type: text/plain\n\n");
      printf("this is the display data\n\n");
      printf("----abcdefg\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:
----abcdefg
Content-type: application/x-compressed

this is the first data

----abcdefg
Content-type: text/plain

this is the display data

----abcdefg

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.
0
Comment
Question by:clc050198
[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
7 Comments
 
LVL 8

Expert Comment

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

0
 

Author Comment

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

Expert Comment

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


0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 3

Expert Comment

by:percyn
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.
0
 

Author Comment

by:clc050198
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.
0
 
LVL 3

Expert Comment

by:percyn
ID: 1842674
IIS 4.0
0
 
LVL 1

Accepted Solution

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

Content-Type: multipart/mixed;
      boundary="----=_NextPart_000_003C_01BD6B2E.8EED5CB0"

See you
Laurent
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
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 …

618 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