summaryrefslogtreecommitdiff
path: root/methods/server.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-05 16:24:32 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-05 16:24:32 +0200
commit9622b2111095c3fc705ec0615d27fe403e18c3b8 (patch)
treefcad94a108b9cb290b44218ff0af89ee8f339120 /methods/server.cc
parent592d06b6f3c2ef2ae47c38005ae3c4e96a0841f2 (diff)
Improve Debug::Acquire::http debug output
Prefix all answers with the URL that the answer is for. This helps when debugging and pipeline is enabled.
Diffstat (limited to 'methods/server.cc')
-rw-r--r--methods/server.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/methods/server.cc b/methods/server.cc
index 5a13f18a7..92d94e638 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -44,7 +44,8 @@ time_t ServerMethod::FailTime = 0;
// ---------------------------------------------------------------------
/* Returns 0 if things are OK, 1 if an IO error occurred and 2 if a header
parse error occurred */
-ServerState::RunHeadersResult ServerState::RunHeaders(FileFd * const File)
+ServerState::RunHeadersResult ServerState::RunHeaders(FileFd * const File,
+ const std::string &Uri)
{
State = Header;
@@ -66,7 +67,7 @@ ServerState::RunHeadersResult ServerState::RunHeaders(FileFd * const File)
continue;
if (Owner->Debug == true)
- clog << Data;
+ clog << "Answer for: " << Uri << endl << Data;
for (string::const_iterator I = Data.begin(); I < Data.end(); ++I)
{
@@ -478,7 +479,7 @@ int ServerMethod::Loop()
Fetch(0);
// Fetch the next URL header data from the server.
- switch (Server->RunHeaders(File))
+ switch (Server->RunHeaders(File, Queue->Uri))
{
case ServerState::RUN_HEADERS_OK:
break;