#!/usr/bin/perl -w
# FlightGear METAR proxy server
-# Melchior FRANZ (c) 2005, <mfranz@aon.at>, GPL V2
+# Melchior FRANZ (c) 2005, <mfranz # aon : at>, GPL V2
# $Id$
#
# typical use
return $ARGV[0];
}
my $mode = 4;
- unshift @ARGV, split / /, $ENV{'METARPROXY'} if defined $ENV{'METARPROXY'};
+ unshift @ARGV, split /\s+/, $ENV{'METARPROXY'} if defined $ENV{'METARPROXY'};
while (1) {
$_ = $ARGV[0];
defined $_ or last;
$metar .= sprintf "$icao %02d%02d%02dZ ", $day, $hour, $min;
$metar .= $last_metar{$addr} || $METAR_DEFAULT;
}
+
+ print $client "HTTP/1.0 200 OK\015\012";
print $client "Content-Type: text/plain\015\012"
. "X-MetarProxy: nasse Maus\015\012"
. "\015\012"