When adding new streams that are copies of old streams, copy the HTTP header.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 16 Aug 2013 15:18:56 +0000 (17:18 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 16 Aug 2013 17:12:25 +0000 (19:12 +0200)
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
httpinput.h

index b066b24..2fe6806 100644 (file)
@@ -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);
index bf7d953..78c49c3 100644 (file)
@@ -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;