summaryrefslogtreecommitdiff
path: root/test/interactive-helper
diff options
context:
space:
mode:
Diffstat (limited to 'test/interactive-helper')
-rw-r--r--test/interactive-helper/aptwebserver.cc7
-rw-r--r--test/interactive-helper/extract-control.cc2
-rw-r--r--test/interactive-helper/rpmver.cc6
-rw-r--r--test/interactive-helper/teestream.h2
-rw-r--r--test/interactive-helper/test_fileutl.cc8
-rw-r--r--test/interactive-helper/test_udevcdrom.cc6
-rw-r--r--test/interactive-helper/testdeb.cc4
7 files changed, 18 insertions, 17 deletions
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
index 4b98cbd7c..b4b3ef870 100644
--- a/test/interactive-helper/aptwebserver.cc
+++ b/test/interactive-helper/aptwebserver.cc
@@ -23,10 +23,10 @@
#include <unistd.h>
#include <algorithm>
-#include <iostream>
#include <fstream>
-#include <sstream>
+#include <iostream>
#include <list>
+#include <sstream>
#include <string>
#include <thread>
#include <vector>
@@ -54,6 +54,7 @@ static std::string httpcodeToStr(int const httpcode) /*{{{*/
case 304: return _config->Find("aptwebserver::httpcode::304", "304 Not Modified");
case 305: return _config->Find("aptwebserver::httpcode::305", "305 Use Proxy");
case 307: return _config->Find("aptwebserver::httpcode::307", "307 Temporary Redirect");
+ case 308: return _config->Find("aptwebserver::httpcode::308", "308 Permanent Redirect");
// Client errors 4xx
case 400: return _config->Find("aptwebserver::httpcode::400", "400 Bad Request");
case 401: return _config->Find("aptwebserver::httpcode::401", "401 Unauthorized");
@@ -127,7 +128,7 @@ static bool sendHead(std::ostream &log, int const client, int const httpcode, st
std::stringstream buffer;
auto const empties = _config->FindVector("aptwebserver::empty-response-header");
- for (auto && e: empties)
+ for (auto const &e: empties)
buffer << e << ":" << std::endl;
_config->Dump(buffer, "aptwebserver::response-header", "%t: %v%n", false);
std::vector<std::string> addheaders = VectorizeString(buffer.str(), '\n');
diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc
index 852ec4ee9..a19e0380c 100644
--- a/test/interactive-helper/extract-control.cc
+++ b/test/interactive-helper/extract-control.cc
@@ -4,8 +4,8 @@
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <string>
#include <iostream>
+#include <string>
#include <unistd.h>
using namespace std;
diff --git a/test/interactive-helper/rpmver.cc b/test/interactive-helper/rpmver.cc
index 017c92fba..b23ba2876 100644
--- a/test/interactive-helper/rpmver.cc
+++ b/test/interactive-helper/rpmver.cc
@@ -1,11 +1,11 @@
#include <config.h>
#include <apt-pkg/debversion.h>
-#include <rpm/rpmio.h>
+#include <ctype.h>
#include <rpm/misc.h>
-#include <stdlib.h>
+#include <rpm/rpmio.h>
#include <stdio.h>
-#include <ctype.h>
+#include <stdlib.h>
#define xisdigit(x) isdigit(x)
#define xisalpha(x) isalpha(x)
diff --git a/test/interactive-helper/teestream.h b/test/interactive-helper/teestream.h
index 728a1bae2..058717ac3 100644
--- a/test/interactive-helper/teestream.h
+++ b/test/interactive-helper/teestream.h
@@ -8,8 +8,8 @@
a logfile easily, so don't expect that to be a bulletproof
implementation. */
-#include <iostream>
#include <apt-pkg/macros.h>
+#include <iostream>
template <typename CharT, typename Traits = std::char_traits<CharT>
> class basic_teebuf: public std::basic_streambuf<CharT, Traits>
diff --git a/test/interactive-helper/test_fileutl.cc b/test/interactive-helper/test_fileutl.cc
index 7c4b95759..6c29b748f 100644
--- a/test/interactive-helper/test_fileutl.cc
+++ b/test/interactive-helper/test_fileutl.cc
@@ -1,13 +1,13 @@
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/error.h>
-#include <sys/types.h>
+#include <fcntl.h>
+#include <stdlib.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
#include <iostream>
#include <string>
diff --git a/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc
index b87dcd935..2355186d6 100644
--- a/test/interactive-helper/test_udevcdrom.cc
+++ b/test/interactive-helper/test_udevcdrom.cc
@@ -2,11 +2,11 @@
#include <apt-pkg/cdrom.h>
-#include <stddef.h>
+#include <iostream>
#include <string>
-#include <assert.h>
#include <vector>
-#include <iostream>
+#include <assert.h>
+#include <stddef.h>
int main()
{
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc
index 69e1ffe0b..0bb24a52a 100644
--- a/test/interactive-helper/testdeb.cc
+++ b/test/interactive-helper/testdeb.cc
@@ -1,10 +1,10 @@
#include <config.h>
-#include <apt-pkg/dirstream.h>
+#include <apt-pkg/arfile.h>
#include <apt-pkg/debfile.h>
+#include <apt-pkg/dirstream.h>
#include <apt-pkg/error.h>
#include <apt-pkg/extracttar.h>
-#include <apt-pkg/arfile.h>
#include <apt-pkg/fileutl.h>
#include <iostream>