[Slim-Checkins] r11731 - in /trunk/server: Slim/Web/HTTP.pm scanner.pl
dsully at svn.slimdevices.com
dsully at svn.slimdevices.com
Fri Apr 6 20:02:32 PDT 2007
Author: dsully
Date: Fri Apr 6 20:02:32 2007
New Revision: 11731
URL: http://svn.slimdevices.com?rev=11731&view=rev
Log:
Bug: N/A
Description: Fix a warning in HTTP. Show text progress bar, don't catch it in the Log framework.
Modified:
trunk/server/Slim/Web/HTTP.pm
trunk/server/scanner.pl
Modified: trunk/server/Slim/Web/HTTP.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Web/HTTP.pm?rev=11731&r1=11730&r2=11731&view=diff
==============================================================================
--- trunk/server/Slim/Web/HTTP.pm (original)
+++ trunk/server/Slim/Web/HTTP.pm Fri Apr 6 20:02:32 2007
@@ -1564,22 +1564,26 @@
my $sendheaders = shift;
my $more = shift || 0;
-
# determine our closing/chunking behaviour
# code above is responsible to set the headers right...
- my $close = ($response->header('Connection') =~ /close/i);
- my $chunked = ($response->header('Transfer-Encoding') =~ /chunked/i);
+ my $close = 0;
+ my $chunked = 0;
# if we have more, don't close now!
- if ($more) {
- $close = 0;
+ if (!$more && $response->header('Connection') && $response->header('Connection') =~ /close/i) {
+
+ $close = 1;
+ }
+
+ if ($response->header('Transfer-Encoding') && $response->header('Transfer-Encoding') =~ /chunked/i) {
+
+ $chunked = 1;
}
# Force byte semantics on $body and length($$body) - otherwise we'll
# try to write out multibyte characters with invalid byte lengths in
# sendResponse() below.
use bytes;
-
# First add the headers, if requested
if (!defined($sendheaders) || $sendheaders == 1) {
@@ -1619,7 +1623,6 @@
addHTTPLastChunk($httpClient, $close);
}
-
} else {
push @{$outbuf{$httpClient}}, {
Modified: trunk/server/scanner.pl
URL: http://svn.slimdevices.com/trunk/server/scanner.pl?rev=11731&r1=11730&r2=11731&view=diff
==============================================================================
--- trunk/server/scanner.pl (original)
+++ trunk/server/scanner.pl Fri Apr 6 20:02:32 2007
@@ -83,7 +83,9 @@
});
# Redirect STDERR to the log file.
- tie *STDERR, 'Slim::Utils::Log::Trapper';
+ if (!$progress) {
+ tie *STDERR, 'Slim::Utils::Log::Trapper';
+ }
STDOUT->autoflush(1);
More information about the checkins
mailing list