[32515] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3780 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 19 09:09:18 2012

Date: Wed, 19 Sep 2012 06:09:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 19 Sep 2012     Volume: 11 Number: 3780

Today's topics:
        File::Path::remove_tree not working <allanherriman@hotmail.com>
        https request failing <mikaelpetterson@hotmail.com>
    Re: https request failing <mikaelpetterson@hotmail.com>
    Re: https request failing <*@eli.users.panix.com>
    Re: https request failing <ben@morrow.me.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 18 Sep 2012 08:19:32 GMT
From: Allan Herriman <allanherriman@hotmail.com>
Subject: File::Path::remove_tree not working
Message-Id: <50582e94$0$29965$c3e8da3$5496439d@news.astraweb.com>

Hi,

I have a script that creates a temporary directory using

my $tempdir = tempdir( CLEANUP => 1 );

Some readonly files are then created in that directory.  All are closed 
before the script finishes.

On my development machine (Activestate Perl 5.16.0 on Windows 7) it 
worked fine: the directory was removed after the script finished.

On the deployment machines (Cygwin Perl 5.10.1 on Windows Server 2003) it 
doesn't remove the directory or any of the files in the directory.



I then added the following line at the end of the script:

remove_tree($tempdir, { safe => 0 });

but that didn't fix anything.

It didn't write anything to STDERR, which I think indicates it didn't 
encounter detectable error conditions.

I'm using -w and strict.

I can manually delete the directory in windows explorer without any 
warnings or prompts, so it doesn't appear to be a permission problem.


What do I do next?


Thanks,
Allan


------------------------------

Date: Tue, 18 Sep 2012 01:35:08 -0700 (PDT)
From: mike <mikaelpetterson@hotmail.com>
Subject: https request failing
Message-Id: <b4a99af1-768b-4215-987d-7170b563aebd@googlegroups.com>

Hi,

The script I have below is used o access an internal website with https (so no proxy here).

use LWP::UserAgent;
use LWP::Debug qw(+);

#create User-agent
my $ua = LWP::UserAgent->new;

$ua->no_proxy("<internalsite>.se");


my $url = "http://<internalsite>.se/org.testng.eclipse/site.xml";

my	$req = HTTP::Request->new(
     GET => $url);
  

  # send request
 my $res = $ua->request($req);

  # check the outcome
  if ($res->is_success) {
     print $res->decoded_content;
  }
  else {
     print "Error: " . $res->status_line . "\n";
  }

When I execute it I get the following error:

LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://<internalsite>.se/org.testng.eclipse/site.xml
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 259 bytes
LWP::UserAgent::request: Simple response: Found
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET https://<internalsite>.se/org.testng.eclipse/site.xml
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::UserAgent::request: Simple response: Internal Server Error
Error: 500 Can't connect to <internalsite>.se/:443 (Bad service '8080/')

Any ideas what the problem can be?

br,

//mike


------------------------------

Date: Tue, 18 Sep 2012 04:32:58 -0700 (PDT)
From: mike <mikaelpetterson@hotmail.com>
Subject: Re: https request failing
Message-Id: <efcbf27e-c5f8-4236-b58f-ef05e1979967@googlegroups.com>

Just a quick note. If I put the url in mozilla I can see the content:

<site><description url=3D"http://beust.com/eclipse-old/eclipse-6.3.2.201112=
03_1323/index.html"/><feature url=3D"features/org.testng.eclipse_6.3.2.2011=
1203_1323.jar" id=3D"org.testng.eclipse" version=3D"6.3.2.20111203_1323"><c=
ategory name=3D"org.testng.eclipse"/></feature><category-def name=3D"org.te=
stng.eclipse" label=3D"TestNG">
   </category-def></site>

br,

//Mike


------------------------------

Date: Tue, 18 Sep 2012 21:27:12 +0000 (UTC)
From: Eli the Bearded <*@eli.users.panix.com>
Subject: Re: https request failing
Message-Id: <eli$1209181719@qz.little-neck.ny.us>

In comp.lang.perl.misc, mike  <mikaelpetterson@hotmail.com> wrote:
> The script I have below is used o access an internal website with https
> (so no proxy here).

Yet this looks like a proxy error.

> $ua->no_proxy("<internalsite>.se");
> my $url = "http://<internalsite>.se/org.testng.eclipse/site.xml";
             ^^^^^^^              ^^^^^
Hmmm. No https there. And no port specified.

> LWP::UserAgent::request: Simple response: Found

Ahh, a redir.

> LWP::UserAgent::send_request: GET
> https://<internalsite>.se/org.testng.eclipse/site.xml
> LWP::UserAgent::_need_proxy: Not proxied
> LWP::Protocol::http::request: ()
> LWP::UserAgent::request: Simple response: Internal Server Error
> Error: 500 Can't connect to <internalsite>.se/:443 (Bad service '8080/')
                                            ^^^^^^^^
At this point I'm really curious why the ":443" appears after the "/",
which would imply a port 80 http request for a resource named "/:443".
Which perhaps that server is then trying something and giving the
error you see?

Myself, I'd try to duplicate this with other tools at this point, in
particular non-browsers, in case there is some browser header sniffing
affecting this.

Elijah
------
or check logs on <internalsite>.seif you have access to those


------------------------------

Date: Tue, 18 Sep 2012 22:41:22 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: https request failing
Message-Id: <2d6ni9-1ki1.ln1@anubis.morrow.me.uk>


Quoth Eli the Bearded <*@eli.users.panix.com>:
> In comp.lang.perl.misc, mike  <mikaelpetterson@hotmail.com> wrote:
> > The script I have below is used o access an internal website with https
> > (so no proxy here).
> 
> Yet this looks like a proxy error.
> 
> > $ua->no_proxy("<internalsite>.se");
> > my $url = "http://<internalsite>.se/org.testng.eclipse/site.xml";
>              ^^^^^^^              ^^^^^
> Hmmm. No https there. And no port specified.
> 
> > LWP::UserAgent::request: Simple response: Found
> 
> Ahh, a redir.
> 
> > LWP::UserAgent::send_request: GET
> > https://<internalsite>.se/org.testng.eclipse/site.xml
> > LWP::UserAgent::_need_proxy: Not proxied
> > LWP::Protocol::http::request: ()
> > LWP::UserAgent::request: Simple response: Internal Server Error
> > Error: 500 Can't connect to <internalsite>.se/:443 (Bad service '8080/')
>                                             ^^^^^^^^
> At this point I'm really curious why the ":443" appears after the "/",
> which would imply a port 80 http request for a resource named "/:443".
> Which perhaps that server is then trying something and giving the
> error you see?
> 
> Myself, I'd try to duplicate this with other tools at this point, in
> particular non-browsers, in case there is some browser header sniffing
> affecting this.

It may also be worth tracking the connection with tcpdump or wireshark
or something similar, or just using the lwp-request tool with the
-uUsSeE options. I suspect what's happening is that internalsite.se is
sending a malformed redirect response.

Ben



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3780
***************************************


home help back first fref pref prev next nref lref last post