summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-06-17 18:28:52 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-06-17 18:28:52 +0200
commit97553e635d2265ec4aad96b00b1fd72d98437f15 (patch)
treefe7b9d415707408dccfc9ec329e6e98cff9d7e0a /test
parent0cef11a38f14432bf36bf34225ec06c52b2cfb65 (diff)
RFC1123StrToTime: Accept const std::string& as first argument
We are converting to std::string anyway by passing to istringstream, and this removes the need for .c_str() in callers.
Diffstat (limited to 'test')
-rw-r--r--test/interactive-helper/aptwebserver.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
index 2243ccea9..0398a12b6 100644
--- a/test/interactive-helper/aptwebserver.cc
+++ b/test/interactive-helper/aptwebserver.cc
@@ -793,7 +793,7 @@ static void * handleClient(int const client, size_t const id) /*{{{*/
if (_config->FindB("aptwebserver::support::modified-since", true) == true && condition.empty() == false)
{
time_t cache;
- if (RFC1123StrToTime(condition.c_str(), cache) == true &&
+ if (RFC1123StrToTime(condition, cache) == true &&
cache >= data.ModificationTime())
{
sendHead(log, client, 304, headers);
@@ -821,7 +821,7 @@ static void * handleClient(int const client, size_t const id) /*{{{*/
if (_config->FindB("aptwebserver::support::if-range", true) == true)
ifrange = LookupTag(*m, "If-Range", "");
bool validrange = (ifrange.empty() == true ||
- (RFC1123StrToTime(ifrange.c_str(), cache) == true &&
+ (RFC1123StrToTime(ifrange, cache) == true &&
cache <= data.ModificationTime()));
// FIXME: support multiple byte-ranges (APT clients do not do this)