Hi me!

I am replying to myself because I have found (at last) an explanation and a
solution. "When everything else have failed, try to read the documentation
!"  Indeed I have found the answer in the Apache FAQ (see below).

In brief, IE handles text/plain in a non standard way. The solution is to
rename cgi-hw-txt.r to cgi-hw-txt.txt or cgi-hw-txt.cgi .

Patrick

Apache FAQ
Why do my files appear correctly in Internet Explorer, but show up as source
or trigger a save window with Netscape; or, Why doesn't Internet Explorer
render my text/plain document correctly?
MS Internet Explorer (MSIE) and Netscape handle mime type detection in
different ways, and therefore will display the document differently. In
particular, IE sometimes relies on the file extension or the contents of the
file to determine the mime type. This can happen when the server specifies a
mime type of application/octet-stream or text/plain. This behavior violates
the the HTTP standard and makes it impossible to deliver plain text
documents to MSIE clients in some cases. More details are available on
MSIE's mime type detection behavior in an MSDN article
(http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.a
sp) and a note by Alan J. Flavell
(http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html).

The best you can do as a server administrator is to accurately configure the
mime type of your documents by editing the mime.types file or using an
AddType directive in the Apache configuration files. In some cases, you may
be able to fool MSIE into rendering text/plain documents correctly by
assuring they have a .txt filename extension, but this will not work if MSIE
thinks the content looks like another file type.


Patrick
----- Original Message -----
From: "pat665" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 10, 2002 1:26 PM
Subject: [REBOL] Re: Problem with Apache and CGI returning text/plain


> Hi Scott,
>
> I had it all correct except for the "Options  ExecCGI" that was "Options
> none". However the problem with text/plain is not solved. It seems that
the
> browser cannot identify the text/plain type. May be it will be clearer
with
> the help of the proxy.r script suggested by Mike.
>
> Patrick
>
> ----- Original Message -----
> From: "G. Scott Jones" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 09, 2002 10:17 PM
> Subject: [REBOL] Re: Problem with Apache and CGI returning text/plain
>
>
> > From: "pat665"
> > > Hi rebollers,
> > >
> > > I am having problem with the following script.
> > >
> > > 8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > > #!d:/rebview/rebol.exe --cgi
> > > REBOL []
> > > print "content-type : text/plain^/^/"
> > > print "Hello CGI-World!! (text)"
> > > 8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > >
> > > The script is short but my problem is a bit longer to explain. This
> script
> > > is installed on a windows 98 machine where both Apache and Personal
Web
> > > Server (PWS) are installed (only one server is active at a time).
> > >
> > > The script is called with the following URL from another windows 98
> > machine:
> > >
> > >  http://192.168.1.51/cgi-bin/cgi-hw-txt.r
> > >
> > > The problem is :
> > > - If Apache is running, I am asked to download the file cgi-hw-txt.r.
> > > - If PWS is running, all is correct and I am getting the display of
> "Hello
> > > CGI-World!!!(text)"
> > <rest snipped>
> >
> > Hi, Pat,
> >
> > I've grown a bit rusty in Apache configuration, but be sure to set-up
> > http.conf as follows, then restart apache:
> >
> > 1) scriptalias has been set for the cgi-bin directory.  Typically
> uncomment
> > the following
> >
> > #ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/"
> >     to
> > ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/"
> >
> > 2) Be sure cgi-bin has been set to be executable by setting Options to
> > ExecCGI:
> > <Directory "C:/Apache/cgi-bin">
> >   AllowOverride None
> >   Options  ExecCGI
> >   Order allow,deny
> >   Allow from all
> > </Directory>
> >
> > 3) If you wish to have executable .r files outside of cgi-bin, need to
add
> > an AddHandler in the AddHandler section as such:
> >
> > AddHandler cgi-script .r
> >
> > This should be considered a security risk, though.
> >
> > Save the httpd.conf file, then restart Apache.
> >
> > Hope this helps.
> > --Scott Jones
> >
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
>
>
>
____________________________________________________________________________
__
> ifrance.com, l'email gratuit le plus complet de l'Internet !
> vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> http://www.ifrance.com/_reloc/email.emailif
>
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

 
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to