httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TD - Sales International Holland B.V." ...@salesint.com>
Subject Re: Hi!
Date Sat, 25 Aug 2001 17:36:17 GMT
On Thursday 17 January 2002 10:57, you wrote:

like in the previous thing, you probably need to print as FIRST line

print "Content-type: text/html\n\n";


> Thanks very much...
>
> Damned browsers...
>
> Well, i changed the text/plain to text/html and also /n for <br>
>
> and every this is working now...
>
> Sorry another cuestion with the browsers:
>
>
> i have this perl script, that runs well in MSIE
> but in Mozilla compatibles presents the output as text, why??
>
>
> #! /usr/bin/perl
>
> # recibe la forma.
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> @pairs = split(/&/, $buffer);
>
> # inicia variables.
> $to = "info\@ciceana.org.mx";
> $from = "info\@ciceana.org.mx";
> $subject = "Comentarios Sitio Web";
>
> # manda el mail.
> open (MAIL,"|mail $to");
> print MAIL <<"END_top";
>
> "To: $to
> Reply-To: $to:
> Subject: $subject"
>
> END_top
>
> foreach $pair (@pairs)
> {
>    ($name, $value) = split(/=/, $pair);
>     $value =~ tr/+/ /;
>     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>     $form{$name} = $value;
>
>    if ($form{$name} ne "" && $form{$name} ne "no" && $name ne 'enviar')
{
>       print MAIL $name . " = ". $form{$name} . "\n";
>   }
> }
>
> close MAIL;
>
> # imprime html.
> print <<WEB_page;
>
> <!doctype html public "-//w3c//dtd html 3.2 final//en">
> <html>
> <head>
> <title>Ciceana - Gracias</title>
> </head>
> <body bgcolor='ffffff'>
> <center>
> <h1><font class='covitur'>Ciceana</font></h1>
> </center>
> <br>
> <center>
> <font>Has sido registrado</font>
> </center>
> <br>
> <center>
> <font>Gracias!</font>
> </center>
> <br>
> <center>
> <font face='Verdana' fgcolor='00006' size='2'><a
> href='../main.html'>regresar<a>
> <enter>
> </body>
> </html>
>
> WEB_page
> exit;
>
>
>
>
> ----- Original Message -----
> From: "Joshua Slive" <joshua@slive.ca>
> To: <users@httpd.apache.org>
> Sent: Thursday, January 17, 2002 5:43 PM
> Subject: RE: Hi!
>
> > > From: Eduardo Cancino [mailto:lalo@ciceana.org.mx]
> > >
> > > Oh! Sorry..
> > >
> > > When i download it, the contents where de output of th script, not the
> > > script itself.
> > >
> > > How i correct this or better where can i read about it ?
> > >
> > > So it's being interpreted but i don't know why is doing that...
> >
> > There we go.  We found the problem.  It has nothing to do with Apache
> > configuration.
> >
> > Check the Content-Type header that the script is printing.  What does it
> > say?
> > It should be something like "Content-Type: text/html".
> >
> > Note that MSIE will not properly deal with the Content-Type "text/plain".
> > It ignores this content type and uses the filename extension to determine
> > how to handle the file.  This is very broken behavior, and essentially
>
> means
>
> > that if you want your cgi script to send plain text, the cgi script
> > itself must have a name ending in .txt.
> >
> > Joshua.
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
> > Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message