]> git.saurik.com Git - apt.git/blobdiff - test/interactive-helper/aptwebserver.cc
Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid
[apt.git] / test / interactive-helper / aptwebserver.cc
index cd52da692a8339cffdbab68ff61b039ea72275a8..e02caa2b3516df0a248cb482256795b648b9ff6a 100644 (file)
@@ -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);