I have an apache module that needs to send a binary file (A Windows .EXE
file). I have been able to send this file to both Netscape 4.0 and MSIE 4.0
with one small problem. MSIE does not get the name of the file. This is to
be the default name presented when the user chooses to save. MSIE presents
a somewhat random sequence of characters.
I looked in RFC 1945 and rfc 2068 but found no documentation as to how to do
this. I guessed at using the same headers I have used when sending
attachements via email. As I said netscape 4.0 figured it out.
Here is a code fragement:
r->content_type = "application/octet-stream; filename=\"GOPlayMe.exe\"";
table_set(r->headers_out,"Content-Disposition","filename=\"GOPlayMe.exe\"") This is followed by a set of rwrite() calls to send the body of the message. As a side question: Is "binary" the preferred encoding format here or should --
I be using "base64"? Also do I have to do anything different for HTTP 1.0
browsers or "chunked" requests? I am a little vague on whether is is the
client of ther server that specifies "chunked".
Madness is a sign of the times.
You must learn to embrace it,
let it inspire you.
This is followed by a set of rwrite() calls to send the body of the message.
As a side question: Is "binary" the preferred encoding format here or should