I have this working now: #!/usr/bin/perl
use strict; use warnings; use HTTP::Response; use LWP::Simple 'getstore'; my $url = 'http://www.jeffherbeck.com/arch.doc'; my $remote_user = $ENV{REMOTE_USER};# || 'unknown_user'; my $file = 'newfile.txt'; my $response = HTTP::Response->new( getstore( $url, "/var/www/html/$remote_user/$file" ) ); print "Content-type: text/html\n\n", $response->status_line(); __END__ but the directory it goes to has to be owned by "apache". Is there any way it can be made to be owned by the remote user? THanks Jeff On Mon, 18 Oct 2004 10:14:22 -0700 (PDT), Bill Jones <[EMAIL PROTECTED]> wrote: > [this is not a question - it is just a small follow-up] > > This code only gives me 404 File Not found -- > which is correct behaviour - > > #!/usr/bin/perl > > use strict; > use warnings; > > use HTTP::Response; > use LWP::Simple 'getstore'; > > my $url = 'http://insecurity.org/test.doc'; > my $remote_user = $ENV{REMOTE_USER} || 'unknown_user'; > my $response = HTTP::Response->new( > getstore( $url, "/$remote_user/test.doc" ) ); > > print > "Content-type: text/html\n\n", > $response->status_line(); > > __END__ > > > NOTES -- the /$remote_user/test.doc section collapses into: > > //test.doc -- because the User is not set -- and the // is evaluated > (at least on my server) as $WWW_DOC_ROOT/path/to/file > > So, AFAIC, it is working. > > cheers; > > > -Sx- > > ===== > -Sx- > seeking employment: http://youve-reached-the.endoftheinternet.org/ > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>