diff --git a/INSTALL.md b/INSTALL.md index d31616bb..0e8d5c2b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -27,7 +27,8 @@ Perl modules (install from CPAN if needed e.g. `perl -MCPAN -e 'install X'`): * type: $ export ARCHFLAGS="-arch x86_64" (replace x86_64 by your arch) - $ brew/port install pkg-config libao + $ brew install pkg-config libao # for [Homebrew](https://github.com/mxcl/homebrew) + $ port install libao # for [MacPorts](http://www.macports.org/) $ make $ perl -MCPAN -e 'install Crypt::OpenSSL::RSA' $ perl -MCPAN -e 'install IO::Socket::INET6' diff --git a/shairport.pl b/shairport.pl index 07401fe5..a7d00297 100755 --- a/shairport.pl +++ b/shairport.pl @@ -261,7 +261,7 @@ sub conn_handle_request { my ($fh, $conn) = @_; my $req = $conn->{req};; - my $clen = $req->header('content-length') // 0; + my $clen = $req->header('content-length') || 0; if ($clen > 0 && !length($req->content)) { $conn->{req_need} = $clen; return; # need more!