#!/usr/bin/perl -wT
use strict;
use IO::Socket;
use IO::Select;

my $port = 10080;
my $server = undef;
while (!$server and $port < 10180) {
    $server = IO::Socket::INET->new(LocalAddr => '127.0.0.1', LocalPort => $port, Proto => 'tcp', Listen => 2, ReuseAddr => 1);
    $port += 1 unless $server;
}
die "Could not connect: $! $@\n" unless $server;

my $sockets = IO::Select->new($server);
my $clients = {};

print "Status: 303 See Other\r\nLocation: http://127.0.0.1:$port/test1\r\nContent-Type: text/plain\r\n\r\nTest server started on port $port\r\n";
close STDOUT;

my @pendingData = $sockets->can_read(5);
foreach my $socket (@pendingData) {
    if ($socket == $server) {
        $socket = $server->accept;
        if ($socket) {
            $socket->syswrite(<<ENDTEST);
HTTP/1.1 200 OK
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
 <head>
  <title>XMLHttpRequest and connection refused</title>
 </head>
 <body>
  <p>FAIL: Script did not run.</p>
  <script type="text/javascript">
   var p = document.getElementsByTagName('p')[0];
   p.firstChild.data = 'FAIL: Test script did not finish.';
   window.onerror = function (error, file, line) { p.firstChild.data += ' (ERROR: ' + error + ' (line ' + line + '))'; }
   if (!window.XMLHttpRequest)
     window.XMLHttpRequest = function () { return new ActiveXObject("Microsoft.XMLHTTP"); }
   var r = new XMLHttpRequest();
   r.open('GET', 'test2', true);
   r.onreadystatechange = function () {
     p.firstChild.data += r.readyState + ' ';
     p.firstChild.data += '(status: ' + r.status + ') ';
   }
   r.send(null);
   p.firstChild.data = 'Response: ';
  </script>
 </body>
</html>
ENDTEST
            $socket->shutdown(2);
            last;
        }
    }
}

$server->shutdown(2);
