From: Steinar H. Gunderson Date: Fri, 16 Aug 2013 15:18:56 +0000 (+0200) Subject: When adding new streams that are copies of old streams, copy the HTTP header. X-Git-Tag: 1.0.0~14 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=2a2689e25c5906f66c5154803aae1d705dbf33af;ds=inline 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. --- 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;