def parse_host_header(request):
    fields = request.headers_in[common.HOST_HEADER].split(':', 1)
    if len(fields) == 1:
        return fields[0], get_default_port(request.is_https())
    try:
        return fields[0], int(fields[1])
    except ValueError, e:
        raise HandshakeException(e % 'Invalid port number format: %r')
dataset/ETHPy150Open google/pywebsocket/mod_pywebsocket/handshake/_base.py/parse_host_header/swapped operands of `%`