implements HTTP response output filtering.
TODO update