summaryrefslogtreecommitdiff
path: root/test/interactive-helper/aptwebserver.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2015-05-22 18:08:19 +0200
committerMichael Vogt <mvo@ubuntu.com>2015-05-22 18:08:19 +0200
commitc2e39004370846f465cf60b6fb312664981179d8 (patch)
treef9bfabdf95f3768a9b829327d08c58ffa14e36a9 /test/interactive-helper/aptwebserver.cc
parentaccd8215ca9a1cb10e92a059d71eb02aac2f0743 (diff)
parentba95c69681dee8a0ae12ba635e56414820ee9113 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: debian/changelog
Diffstat (limited to 'test/interactive-helper/aptwebserver.cc')
-rw-r--r--test/interactive-helper/aptwebserver.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
index cd52da692..e02caa2b3 100644
--- a/test/interactive-helper/aptwebserver.cc
+++ b/test/interactive-helper/aptwebserver.cc
@@ -654,13 +654,15 @@ static void * handleClient(void * voidclient) /*{{{*/
if (filesize > filestart)
{
data.Skip(filestart);
- std::ostringstream contentlength;
- contentlength << "Content-Length: " << (filesize - filestart);
- headers.push_back(contentlength.str());
+ // make sure to send content-range before conent-length
+ // as regression test for LP: #1445239
std::ostringstream contentrange;
contentrange << "Content-Range: bytes " << filestart << "-"
<< filesize - 1 << "/" << filesize;
headers.push_back(contentrange.str());
+ std::ostringstream contentlength;
+ contentlength << "Content-Length: " << (filesize - filestart);
+ headers.push_back(contentlength.str());
sendHead(client, 206, headers);
if (sendContent == true)
sendFile(client, headers, data);