delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/16/15:43:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 16 Jul 2004 15:42:55 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Dirk Fokken, Cross Development" <dirk DOT fokken AT cross-development DOT de>
cc: cygwin AT cygwin DOT com
Subject: Re: Bad protocol 'tcp' with perl/lwp module connections
In-Reply-To: <20040716_150347_005063.dirk.fokken@cross-development.de>
Message-ID: <Pine.GSO.4.58.0407161539010.10869@slinky.cs.nyu.edu>
References: <20040716_150347_005063 DOT dirk DOT fokken AT cross-development DOT de>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Fri, 16 Jul 2004, Dirk Fokken, Cross Development wrote:

> Running a cgi script like the following from the command line works
> pretty fine.
>
> Running the same script from within the browser result in an error
> message like:
>
> http://192.168.0.5/cgi-bin/lwp.cgi
> > 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp')
>
> The sample script:
> ------------------------------
> #!/usr/bin/perl -w
>
> use CGI qw(:standard);
>
> print header();
>
>   # Create a user agent object
>   use LWP::UserAgent;
>   $ua = LWP::UserAgent->new;
>   $ua->agent("MyApp/0.1 ");
>
>   # Create a request
>   my $req = HTTP::Request->new(POST => 'http://search.cpan.org/search');
>   $req->content_type('application/x-www-form-urlencoded');
>   $req->content('query=libwww-perl&mode=dist');
>
>   # Pass request to the user agent and get a response back
>   my $res = $ua->request($req);
>
>   # Check the outcome of the response
>   if ($res->is_success) {
>       print $res->content;
>   }
>   else {
>       print $res->status_line, "\n";
>   }
> ------------------------------
>
> System versions are:
>
>     Cygwin DLL version info:
>         DLL version: 1.5.10
>
> on
>
>     Windows 2000 Professional Ver 5.0 Build 2195
>
>      + Apache/1.3.29
>
> Many thanks for help.
>
> Kind regards,
> Dirk

You already posted this (or something close enough to it):
<http://cygwin.com/ml/cygwin/2004-07/msg00573.html>.
It was replied to: <http://cygwin.com/ml/cygwin/2004-07/msg00574.html>.

Please attach the output of "cygcheck -svr" on your system.  Also, please
show the output of "ls -l /etc/protocols", preferably from the two
invocations of the script.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019