summaryrefslogtreecommitdiff
path: root/test/interactive-helper/aptwebserver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/interactive-helper/aptwebserver.cc')
-rw-r--r--test/interactive-helper/aptwebserver.cc7
1 files changed, 4 insertions, 3 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');