'Encode a single header value to a UTF-8 encoded bytestring if required.
@param value: A single HTTP header value.
@type value: L{bytes} or L{unicode}
@return: C{value}, encoded if required
@rtype: L{bytes}'

def _encodeValue(self, value):

    if isinstance(value, unicode):
        return value.encode('utf8')
    return value
