Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
https request failing
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mike  
View profile  
 More options Sep 18 2012, 4:35 am
Newsgroups: comp.lang.perl.misc
From: mike <mikaelpetter...@hotmail.com>
Date: Tue, 18 Sep 2012 01:35:08 -0700 (PDT)
Local: Tues, Sep 18 2012 4:35 am
Subject: https request failing
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mike  
View profile  
 More options Sep 18 2012, 7:32 am
Newsgroups: comp.lang.perl.misc
From: mike <mikaelpetter...@hotmail.com>
Date: Tue, 18 Sep 2012 04:32:58 -0700 (PDT)
Local: Tues, Sep 18 2012 7:32 am
Subject: Re: https request failing
Just a quick note. If I put the url in mozilla I can see the content:

<site><description url="http://beust.com/eclipse-old/eclipse-6.3.2.20111203_1323/index.html"/><feature url="features/org.testng.eclipse_6.3.2.20111203_1323.jar" id="org.testng.eclipse" version="6.3.2.20111203_1323"><category name="org.testng.eclipse"/></feature><category-def name="org.testng.eclipse" label="TestNG">
   </category-def></site>

br,

//Mike


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli the Bearded  
View profile  
 More options Sep 18 2012, 5:27 pm
Newsgroups: comp.lang.perl.misc
From: Eli the Bearded <*...@eli.users.panix.com>
Date: Tue, 18 Sep 2012 21:27:12 +0000 (UTC)
Local: Tues, Sep 18 2012 5:27 pm
Subject: Re: https request failing
In comp.lang.perl.misc, mike  <mikaelpetter...@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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Morrow  
View profile  
 More options Sep 18 2012, 5:48 pm
Newsgroups: comp.lang.perl.misc
From: Ben Morrow <b...@morrow.me.uk>
Date: Tue, 18 Sep 2012 22:41:22 +0100
Local: Tues, Sep 18 2012 5:41 pm
Subject: Re: https request failing

Quoth Eli the Bearded <*...@eli.users.panix.com>:

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dr.Ruud  
View profile  
 More options Sep 19 2012, 11:02 am
Newsgroups: comp.lang.perl.misc
From: "Dr.Ruud" <rvtol+use...@xs4all.nl>
Date: Wed, 19 Sep 2012 17:02:24 +0200
Local: Wed, Sep 19 2012 11:02 am
Subject: Re: https request failing
On 2012-09-18 10:35, mike wrote:

> 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";

The cut lines can be replaced by:

my $res= $ua->get( $url );

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

Also print Dumper( $res ) for details.

--
Ruud


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »