How to create multipart files
-----------------------------


Problem:

First We need to have a header, that makes the ASP part of the WEB server send the file as a multipart/related file:

<% Response.ContentType="multipart/related; boundary=boundary1; start=""<060223.DD@Obigo.com>""; type=""application/vnd.oma.dd+xml""" %>

Second we want to add the "meat" of the file.

If we open a text editor and copy/paste in the multipart, any binary data (e.g. picture) will be corrupt!

Instead, we use:


>type OMA_DL_pre.txt > OMA_DL_new_comb.asp

>type OMA_DL_comb_GIF.dat >> OMA_DL_new_comb.asp


where:
	OMA_DL_pre.txt		contains the ASP text as above
	OMA_DL_comb_GIF.dat 	contains the multipart


How to make a multipart:


This is done in ProTeller. The easiest way to build a multipart PDU is to copy an existing one, and change the content....

e.g. the file: OMADL_comb_GIF.http.pep

The file contains a complete PDU, including HTTP headers, which we do not need, since our ASP server will add that for us.

Thus, the content part (multipart) is Exported from ProTeller to a data file (e.g. OMA_DL_comb_GIF.dat).




Magnus Krampell, 2006-03-02