From 2a2689e25c5906f66c5154803aae1d705dbf33af Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 16 Aug 2013 17:18:56 +0200 Subject: [PATCH] When adding new streams that are copies of old streams, copy the HTTP header. This was already fixed for UDP inputs, but not HTTP inputs. Also, we probably do not do the right thing here for the stream header. --- httpinput.cpp | 6 ++++++ httpinput.h | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/httpinput.cpp b/httpinput.cpp index b066b24..2fe6806 100644 --- a/httpinput.cpp +++ b/httpinput.cpp @@ -539,6 +539,12 @@ void HTTPInput::drop_pending_data(size_t num_bytes) pending_data.erase(pending_data.begin(), pending_data.begin() + num_bytes); } +void HTTPInput::add_destination(int stream_index) +{ + stream_indices.push_back(stream_index); + servers->set_header(stream_index, http_header, ""); +} + InputStats HTTPInput::get_stats() const { MutexLock lock(&stats_mutex); diff --git a/httpinput.h b/httpinput.h index bf7d953..78c49c3 100644 --- a/httpinput.h +++ b/httpinput.h @@ -21,10 +21,7 @@ public: virtual std::string get_url() const { return url; } - virtual void add_destination(int stream_index) - { - stream_indices.push_back(stream_index); - } + virtual void add_destination(int stream_index); virtual InputStats get_stats() const; -- 2.39.2