]> git.mxchange.org Git - flightgear.git/blobdiff - utils/metarproxy/metarproxy
VS2015 compatability fixes.
[flightgear.git] / utils / metarproxy / metarproxy
index 03a7b87a8b109bb6406ff74d9244299092daff35..88320881fc56551fac62f5fc9992a49bdaeb1400 100755 (executable)
@@ -1,6 +1,6 @@
 #!/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
@@ -109,7 +109,7 @@ sub parse_options()
                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;
@@ -441,6 +441,8 @@ sub serve()
                                $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"