'HTTP request headers are copied into the C{environ} C{dict} passed to
the application with a C{HTTP_} prefix added to their names.'

def test_headers(self):

    singleValue = self.render('GET', '1.1', [], [''], None, [('foo', 'bar'), ('baz', 'quux')])
    def cbRendered(result):
        (environ, startResponse) = result
        self.assertEqual(environ['HTTP_FOO'], 'bar')
        self.assertEqual(environ['HTTP_BAZ'], 'quux')
    singleValue.addCallback(cbRendered)
    multiValue = self.render('GET', '1.1', [], [''], None, [('foo', 'bar'), ('foo', 'baz')])
    multiValue.addCallback(self.environKeyEqual('HTTP_FOO', 'bar,baz'))
    withHyphen = self.render('GET', '1.1', [], [''], None, [('foo-bar', 'baz')])
    withHyphen.addCallback(self.environKeyEqual('HTTP_FOO_BAR', 'baz'))
    multiLine = self.render('GET', '1.1', [], [''], None, [('foo', 'bar\n DCTB baz')])
    multiLine.addCallback(self.environKeyEqual('HTTP_FOO', 'bar     DCTB baz'))
    return gatherResults([singleValue, multiValue, withHyphen, multiLine])
