> > Mark Rowlands wrote:
> > : ok..this is my first bash at a serious cgi script. it is using DBI and
> > : CGI to connect to a bunch of databases and edit various fields. Problem
> > : is all was fine and dandy (more or less) while testing with IE5.5. Then I
> > : checked with netscape 4.77 and Konqueror 2.1.1 both of these just
> > : display the html!
> >
> > Sounds like a server problem- not setting the right default MIME type or
> > something. Try explicitly giving the MIME type:
> >
> > print $cgi->header (-type => 'text/html');
> >
> > -- tdk
>
> nope :-(
>
> I even went and bought a book!.......that didn't help either.....tried it on
> another server :-( installed the default apache httpd.conf....
Generally, with a situation like this, I telnet to port 80 and view the headers
directly. I'm not
as familiar with doing this programatically, but you can try the following (note where
you need to
insert your URL!):
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use Data::Dumper;
my $ua = LWP::UserAgent->new;
# insert the URL here
my $request = HTTP::Request->new( HEAD => 'http://some.server.name/' );
my $response = $ua->request($request);
$Data::Dumper::Indent = 1;
print Dumper $response;
The output will be the data contained in the response object. If you have difficulty
understanding it (it can be a bit confusing), post the output to this list and we can
take a look
at the data for you.
If anyone else knows of a cleaner way of printing just the headers (short of using
IO::Socket),
I'd love to see it!
Cheers,
Curtis Poe
"Ovid" on http://www.perlmonks.org/
=====
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
http://online.offshore.com.ai/arms-trafficker/
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/