]> git.saurik.com Git - apt.git/blobdiff - test/interactive-helper/aptwebserver.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / test / interactive-helper / aptwebserver.cc
index c933060e75e7918a7eec6fc09afa456da3f2c50c..411da0e8f93784fa4a3f39215c15aaa40980470b 100644 (file)
@@ -731,13 +731,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);