DouweM/shoutout — pull request #3 by confact (2014-12-10 07:46:12+00:00)
Title: Support for status_code in different stream types

This is similar to the first pull request with some difference how to handle the status code, with support for not going in a infinite redirect loop and to set the special headers.

The headers that was testdata in first PR will be included in this pull request. some streams seems to look for user-agent and Host to allow or deny the metadata, somehow. This made it work for some custom streams.

I had some streams that had 301 redirects which the new status code fix works for. I needed to check if status_code exist, and if it exist I check if it is redirect, and connect to the header location instead. If not I just run as normal. I had 2 streams that went into a redirect loop which is why I raise a exception if it is still the same url after one redirect, to stop the infinite loop.