--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gnump3d: Content-length is always one byte too large.
- From: "Glenn Y. Rolland" <glenux@glenux.net>
- Date: Fri, 16 May 2008 19:31:05 +0200
- Message-id: <20080516173105.13095.53398.reportbug@daneel.glenux.net>
Package: gnump3d
Version: 3.0-4
Severity: important
GnuMP3d reports a bad content-length to the http client. That makes some
clients try to resume the download.
Example:
$ ls -l music.mp3
=> -rw-r--r-- 1 glenux glenux 6257859 aoû 1 2005 music.mp3
a
$ wget http://localhost:8888/music.mp3
--2008-05-16 16:06:17-- http://localhost:8888/music.mp3
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8888... connected.
HTTP request sent, awaiting response... 200 OK
=> Length: 6257860 (6.0M) [audio/mpeg]
b Saving to: `music.mp3'
99% [=========================================================> ] 6,257,859 111K/s in 57s
=> 2008-05-16 16:07:16 (107 KB/s) - Connection closed at byte 6257859. Retrying.
c
--2008-05-16 16:07:17-- (try: 2) http://localhost:8888/music.mp3
Connecting to localhost|127.0.0.1|:8888... connected.
HTTP request sent, awaiting response... 206 OK
Length: 6257860 (6.0M), 1 remaining [audio/mpeg]
Saving to: `music.mp3'
99% [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ] 6,257,859 --.-K/s in 0s
[...]
We clearly see the differences between the reported file length
in a), b) and c).
See attached patch for the fix.
Best regards,
Glenn.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.22.19-vs2.2.0.7 (PREEMPT)
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gnump3d depends on:
ii adduser 3.107 add and remove users and groups
ii debconf 1.5.21 Debian configuration management sy
ii logrotate 3.7.1-3 Log rotation utility
ii netbase 4.32 Basic TCP/IP networking system
ii perl 5.8.8-12 Larry Wall's Practical Extraction
ii perl-modules 5.8.8-12 Core Perl modules
gnump3d recommends no packages.
-- debconf information:
gnump3d/user: gnump3d
gnump3d/root: /var/music
gnump3d/port: 8888
diff -Nur gnump3d-3.0/bin/gnump3d2 gnump3d-3.0.fix/bin/gnump3d2
--- gnump3d-3.0/bin/gnump3d2 2008-05-16 15:57:31.000000000 +0200
+++ gnump3d-3.0.fix/bin/gnump3d2 2008-05-16 16:36:57.000000000 +0200
@@ -1319,11 +1319,12 @@
$mtime = gmtime $mtime;
my ($day, $mon, $dm, $tm, $yr) =
($mtime =~ m/(...) (...) (..) (..:..:..) (....)/);
+ my $last_byte_pos = $length - 1;
# matt: handle partial content
if (!$extra->{NoContentLength}) {
- $header .= "Content-Range: bytes $range-$length/$length\n";
- $length -= $range;
+ $header .= "Content-Range: bytes $range-$last_byte_pos/$length\n";
+ $length -= ($range + 1);
$header .= "Content-length: $length\n";
}
$header .= "Last-Modified: $day, $dm $mon $yr $tm GMT\n";
--- End Message ---
--- Begin Message ---
- To: 481526-done@bugs.debian.org
- Subject: gnump3d has been removed from Debian, closing #481526
- From: Marco Rodrigues <gothicx@sapo.pt>
- Date: Mon, 2 Jun 2008 14:08:31 +0100
- Message-id: <200806021308.m52D8VUZ011160@kmos.homeip.net>
Version: 3.0-4+rm
The gnump3d package has been removed from Debian testing, unstable and
experimental, so I am now closing the bugs that were still opened
against it.
For more information about this package's removal, read
http://bugs.debian.org/468643 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.
Don't hesitate to reply to this mail if you have any question.
Thank you for your contribution to Debian.
--
Marco Rodrigues
http://Marco.Tondela.org
--- End Message ---