Thread [HTTP::Async] in Verbindung mit RewriteRule in der .htaccess
(30 answers)
Opened by bianca at 2016-03-04 17:02
Leider keine Änderung, bleibt bei 503, habe es vor und hinter $id_entfernt = $async->add($request) versucht.
Sieht dann aktuell so aus: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 #!/usr/bin/perl use strict; use warnings; use Data::Dumper; require Data::Dumper; Data::Dumper->import(qw(Dumper)); use 5.010; my $generiere_objekt = sub { my ($var) = @_; if (!defined $$var) { $$var = HTTP::Async->new( timeout => 10, max_request_time => 15, cookie_jar => defined, ); } }; my $async; my $id_entfernt = 0; require HTTP::Async; require HTTP::Request::Common; use Net::HTTPS::NB; my $request = HTTP::Request->new( 'GET', 'https://meine.domain:443/cgi-bin/meinscript.pl?key=val', HTTP::Headers->new(), ); $generiere_objekt->(\$async); my %ssl_options = ( verify_hostname => 0, blocking => 0, ); $async->ssl_options(\%ssl_options); $id_entfernt = $async->add($request); if (defined $async) { while (my($response,$id) = $async->wait_for_next_response) { say "ID $id :",Dumper($response); say $response->is_error; say $response->code; } } STDOUT: Code: (dl
)
1 ID 1 :$VAR1 = bless( { Mit diesen Rewrites auf dem Server: Code: (dl
)
1 RewriteCond %{SERVER_PORT} !^443$ Was kann ich noch versuchen? 10 print "Hallo"
20 goto 10 |