OSF doesn't like 'connect' in wwwhttp.pl :(

Philip Hallstrom (philip@u.washington.edu)
Fri, 12 Jan 1996 23:46:38 -0800 (PST)


Hi all,
	I've scanned the mail archive and haven't seen my problem, so 
here goes (I have this icky feeling it's not a libwww thing, but a bad 
install with perl or something... I don't know..)

*sigh*

wwwhttp.pl will not make connections to any machine anywhere.  Let me 
explain (bear with me).  This is on a Dec OSF...

----
Digital UNIX V3.2C  (Rev. 148); Fri Dec 22 10:56:27 PST 1995
Digital UNIX V3.2C Worksystem Software (Rev. 148)
----

(if that isn't enough, tell me where to find more... can't seem to think 
of any commands...)

I installed the package and at first it didn't couldn't find socket.ph so 
I ran that little program and made one.  That made it happy.  I was going 
through the tests and everything was working fine until it tried to 
request URLs.

I've narrowed it down to the following line of code in wwwhttpd.pl

print("Got here.\n");
        connect(FS, $that) || die "Cannot connect to $host:$port, $! \n";
print("But not here.\n");

(that's line 120)

Now I'll admit quite freely that I don't understand sockets at all, but 
lynx works fine, telnetting to port 80 on the webserver works fine, 
etc...  So that makes me suspect the libwww package.

But I really wanted to play with it so I installed it on an AIX machine 
we have.  Well, I just copied all the files over, not really installing, 
cause I kept the same socket.ph (didn't even think to change it). 

Anyway.. all the problems were gone on AIX.  I also installed it on a Sun 
running SunOS at work and still no problems.


So... now my head is hurting...  What am I missing?  Is it some "feature" 
of OSF?  Or is perl not installed correctly (if you can tell from this 
ranting :)

Here is the socket.ph file on OSF

-----------
sub AF_INET { 2; }
sub PF_INET { 2; }
sub SOCK_DGRAM { 2; }
sub SOCK_STREAM { 1; }
1;
-----------

Here is an attempt to get a URL on OSF
-----------
philip@saul2:~/lib/perl/libwww-perl-0.40% ./get 
http://weber/~philip/index.html
GET http://weber/~philip/index.html HTTP/1.0
Got here.
User-Agent: GET/0.5 libwww-perl/0.40
From: philip@saul2.u.washington.edu

HTTP/1.0 602 Connection Failed
mime-version: 1.0
content-type: text/html
content-length: 257
date: Sat, 13 Jan 1996 07:43:59 GMT

<HEAD><TITLE>602 Connection Failed</TITLE></HEAD>
<BODY><H1>602 Connection Failed</H1>
The following request could not be satisfied by this client:
<PRE>
GET http://weber:80/~philip/index.html

Cannot connect to weber:80, Connection refused

</PRE></BODY>
philip@saul2:~/lib/perl/libwww-perl-0.40%
------------

Here is the exact same request on AIX
(note: I took out the "got here" calls since it works)
------------
philip@homer30:~/lib/perl/libwww-perl-0.40% get 
http://weber/~philip/index.html
GET http://weber/~philip/index.html HTTP/1.0
User-Agent: GET/0.5 libwww-perl/0.40
From: philip@homer30.u.washington.edu

HTTP/1.0 200 Document follows
Date: Sat, 13 Jan 1996 07:26:46 GMT
Server: NCSA/1.4.2
Content-type: text/html
Last-modified: Sun, 07 Jan 1996 00:25:31 GMT
Content-length: 368

Philip Hallstrom's Home Page Well, everything that was here is now gone. Just don't have the time anymore to keep this up to date so I've tossed everything but my resume and my bookmarks.


Philip Hallstrom / philip@u.washington.edu
philip@homer30:~/lib/perl/libwww-perl-0.40%


If anyone has any light they can shed on why this might be happening, I'd 
be very grateful!!!

Thanks!

-philip

-- Philip Hallstrom             philip@u.washington.edu
                                http://weber.u.washington.edu/~philip
--------------------------------------------------------------------------
When I play with my cat, how do I know that she is not passing time with me
rather than I with her?
-Montaigne
--------------------------------------------------------------------------