r311 - in /apt-transport-debtorrent/trunk: debian/changelog debtorrent.cc
camrdale-guest at users.alioth.debian.org
camrdale-guest at users.alioth.debian.org
Sun Nov 4 19:11:11 UTC 2007
Author: camrdale-guest
Date: Sun Nov 4 19:11:11 2007
New Revision: 311
URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=311
Log:
* Upgrade transport version to 0.2
* Remove support for Range headers as they may confuse the
sparse file allocation
Modified:
apt-transport-debtorrent/trunk/debian/changelog
apt-transport-debtorrent/trunk/debtorrent.cc
Modified: apt-transport-debtorrent/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/debian/changelog?rev=311&op=diff
==============================================================================
--- apt-transport-debtorrent/trunk/debian/changelog (original)
+++ apt-transport-debtorrent/trunk/debian/changelog Sun Nov 4 19:11:11 2007
@@ -1,3 +1,11 @@
+apt-transport-debtorrent (0.2.0) unstable; urgency=low
+
+ * Upgrade transport version to 0.2
+ * Remove support for Range headers as they may confuse the
+ sparse file allocation
+
+ -- Cameron Dale <camrdale at gmail.com> Sun, 04 Nov 2007 10:57:37 -0800
+
apt-transport-debtorrent (0.1.1) unstable; urgency=low
* Add the source location to the copyright file
Modified: apt-transport-debtorrent/trunk/debtorrent.cc
URL: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/debtorrent.cc?rev=311&op=diff
==============================================================================
--- apt-transport-debtorrent/trunk/debtorrent.cc (original)
+++ apt-transport-debtorrent/trunk/debtorrent.cc Sun Nov 4 19:11:11 2007
@@ -556,10 +556,12 @@
{
HaveContent = true;
+ /* Remove Range headers as DebTorrent doesn't support them and it could cause
+ * problems with sparse file writing.
if (sscanf(Val.c_str(),"bytes %lu-%*u/%lu",&StartPos,&Size) != 2)
return _error->Error("The DebTorrent client sent an invalid Content-Range header");
if ((unsigned)StartPos > Size)
- return _error->Error("This DebTorrent client has broken range support");
+ return _error->Error("This DebTorrent client has broken range support"); */
return true;
}
@@ -614,12 +616,14 @@
/* Build the request. We include a keep-alive header to tweak old
http/1.0 servers that do support keep-alive but not HTTP/1.1
automatic keep-alive. */
- sprintf(Buf,"GET %s DEBTORRENT/0.1\r\nHost: %s\r\nConnection: keep-alive\r\n",
+ sprintf(Buf,"GET %s DEBTORRENT/0.2\r\nHost: %s\r\nConnection: keep-alive\r\n",
QuoteString(Uri.Path,"~").c_str(),ProperHost.c_str());
string Req = Buf;
// Check for a partial file
+ /* Remove Range headers as DebTorrent doesn't support them and it could cause
+ * problems with sparse file writing.
struct stat SBuf;
if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0)
{
@@ -629,13 +633,13 @@
Req += Buf;
}
else
- {
+ { */
if (Itm->LastModified != 0)
{
sprintf(Buf,"If-Modified-Since: %s\r\n",TimeRFC1123(Itm->LastModified).c_str());
Req += Buf;
}
- }
+ /* } */
if (Uri.User.empty() == false || Uri.Password.empty() == false)
Req += string("Authorization: Basic ") +
More information about the Debtorrent-commits
mailing list