'Bytes in fields of the request which are not part of ASCII are escaped
in the result.'

def test_nonASCII(self):

    reactor = Clock()
    reactor.advance(1234567890)
    timestamp = http.datetimeToLogString(reactor.seconds())
    request = DummyRequestForLogTest(http.HTTPFactory(reactor=reactor))
    request.client = IPv4Address('TCP', 'evil    x-forwarded-for    \x80', 12345)
    request.method = 'POS\x81'
    request.protocol = 'HTTP/1.\x82'
    request.requestHeaders.addRawHeader('referer', 'evil    \x83')
    request.requestHeaders.addRawHeader('user-agent', 'evil    \x84')
    line = http.combinedLogFormatter(timestamp, request)
    self.assertEqual(u'"evil    x-forwarded-for    \\x80"    -    -    [13/Feb/2009:23:31:30    +0000]    "POS\\x81    /dummy    HTTP/1.0"    123    -    "evil    \\x83"    "evil    \\x84"', line)
