You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users-de@httpd.apache.org by "Dirk Fokken, Cross Development" <di...@cross-development.de> on 2004/07/19 12:29:15 UTC

Bad protocol 'tcp' with perl/lwp module connections on cygwin port

Ich m�chte eine Perl basierte Web-Applikation auf Windows mit Cygwin laufen lassen. Die Web-Applikation ist auf Unix entwickelt und l�uft rund.

In Cygwin l�uft soweit alles, bis auf den Umstand, das Verbindungen mit dem LWP Modul aus Perl im CGI mit einem Protokoll-Problem abbrechen.

Das folgende CGI-Skript l�uft von der Kommandozeile in Cygwin einwandfrei. 

Dasselbe Skript �ber den Apache gestartet kommt mit folgender Message zur�ck:

http://192.168.0.5/cgi-bin/lwp.cgi
> 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp')

Die Cygwin Mailingliste konnte mir einen Tip geben, /etc/protocols k�nnte nicht gefunden werden. Weiter bin ich aber nicht gekommen. 

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

Systemumgebung:

Apache/1.3.29
auf Cygwin 
    DLL version info: 
    DLL version: 1.5.10

auf 

Windows 2000 Professional Ver 5.0 Build 2195

Vielen Dank f�r die Hilfe.

Beste Gr�sse,

Dirk Fokken

--------------------------------------------------------------------------
                Apache HTTP Server Mailing List "users-de" 
      unsubscribe-Anfragen an users-de-unsubscribe@httpd.apache.org
           sonstige Anfragen an users-de-help@httpd.apache.org
--------------------------------------------------------------------------