Re: GET html page - permission denied

2000-06-01 Thread Doug MacEachern

On Thu, 25 May 2000, Prasit P wrote:

> By the way, i can access "http://209.10.98.1/index.html" using internet
> browser, but not the perl socket.

because the browser doesn't include http://x.x.x.x in the http request,
unless you are configured to use an http proxy.

> > > > > print $remote "GET http://209.10.98.1/index.html HTTP/1.0\n\n";

change that to "GET /index.html HTTP/1.0\n\n", which is the same as your
browser would send.





Re: GET html page - permission denied

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Prasit P wrote:

> Thank guys for your answer.  I've just tried using Apache 1.3.12, and mod_perl
> 1.24, all downloaded today, but it's the same problem.

seems that only works when you use http://hostname, both mod_proxy and
mod_perl use logic like so:

!(r->parsed_uri.hostname
  && strEQ(r->parsed_uri.scheme, ap_http_method(r))
  && ap_matches_request_vhost(r, r->parsed_uri.hostname,
  r->parsed_uri.port_str ? 
  r->parsed_uri.port : 
  ap_default_port(r)));

logic could probably be added to compare the ip addresses, but why do you
need to do that anyhow?  what's wrong with using 
'GET /index.html http/1.0' ?




Re: GET html page - permission denied

2000-05-25 Thread Prasit P

Thank guys for your answer.  I've just tried using Apache 1.3.12, and mod_perl
1.24, all downloaded today, but it's the same problem.

Anything that I can do with httpd.conf, to make it run find with mod_perl.

Regards,





--- Doug MacEachern <[EMAIL PROTECTED]> wrote:
> On Thu, 25 May 2000, ___cliff rayman___ wrote:
> > >  PeerAddr  => 209.10.98.1,
> 
> > > print $remote "GET http://209.10.98.1/index.html HTTP/1.0\n\n";
>  
> > your answer #1 is correct.
> > you have already connected to 209.10.98.1 via http protocol.
> 
> but since both are to the same address, it should work fine, which is what
> the 1.22 fix i mentioned deals with.
> 


=

"God is REAL ... 
 unless previously declared as an INTEGER."

   - anonymous


__
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/



Re: GET html page - permission denied

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, ___cliff rayman___ wrote:
> >  PeerAddr  => 209.10.98.1,

> > print $remote "GET http://209.10.98.1/index.html HTTP/1.0\n\n";
 
> your answer #1 is correct.
> you have already connected to 209.10.98.1 via http protocol.

but since both are to the same address, it should work fine, which is what
the 1.22 fix i mentioned deals with.




Re: GET html page - permission denied

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Prasit P wrote:

> Hi guys,
> 
> I've built Apache 1.3.12 with mod_perl 1.21.

try upgrading mod_perl, 1.22 has this change:

=item 1.22 - March 22, 2000

proxy support fixed wrt RFC2068, thanks to Benjamin Elijah
Griffin for the spot





Re: GET html page - permission denied

2000-05-25 Thread ___cliff rayman___


 
Prasit P wrote:
Hi guys,
I've built Apache 1.3.12 with mod_perl 1.21.
I would get permission denied message, if I use this perl script.
$remote = IO::Socket::INET->new( Proto => "tcp",

PeerAddr  => 209.10.98.1,

PeerPort  => 80,
   
);
print $remote "GET http://209.10.98.1/index.html
HTTP/1.0\n\n";
However, the script would work fine if I use either one of these workarounds:
1. Change "print" line to
print $remote "GET index.html HTTP/1.0\n\n";
 
your answer #1 is correct.
you have already connected to 209.10.98.1 via http protocol.
 
--
___cliff [EMAIL PROTECTED]