]> sjero.net Git - wget/blobdiff - tests/HTTPServer.pm
[svn] Minor bugfixing for test suite.
[wget] / tests / HTTPServer.pm
index c66ef85307fa6249b2add5083b9cc54a80da9b14..6747359ec648cde68f435f1946194a4bb0b434af 100755 (executable)
@@ -19,6 +19,7 @@ sub run {
     my ($self, $urls) = @_;
                                 
     while (my $con = $self->accept) {
+        print STDERR "Accepted a new connection\n" if $log;
         while (my $req = $con->get_request) {
             my $url_path = $req->url->path;
             if ($url_path =~ m{/$}) {
@@ -71,8 +72,10 @@ sub run {
             } else {
                 print STDERR "Requested wrong URL: ", $url_path, "\n" if $log;
                 $con->send_error($HTTP::Status::RC_FORBIDDEN);
-            }
+                last;
+            }            
         }
+        print STDERR "Closing connection\n" if $log;
         $con->close;
         undef($con);
     }