Esempio n. 1
0
def _exchange_marker(exchange):
    if exchange.request:
        marker = u'------------ request: %s %s' % (printable(
            exchange.request.method), printable(exchange.request.target))
    elif exchange.responses:
        marker = u'------------ unknown request'
    else:
        marker = u'------------'
    # The number 79 fits the default ``cmd.exe`` size in Windows.
    return ellipsize(marker, 79) + u'\n'
Esempio n. 2
0
def _exchange_marker(exchange, req_i):
    if exchange.request:
        marker = u'------------ request %d : %s %s' % (
            req_i,
            printable(exchange.request.method),
            printable(exchange.request.target))
    elif exchange.responses:
        marker = u'------------ unknown request'
    else:
        marker = u'------------'
    return ellipsize(marker, 80) + u'\n'
Esempio n. 3
0
def _exchange_marker(exchange):
    if exchange.request:
        marker = u'------------ request: %s %s' % (
            printable(exchange.request.method),
            printable(exchange.request.target))
    elif exchange.responses:
        marker = u'------------ unknown request'
    else:
        marker = u'------------'
    # The number 79 fits the default ``cmd.exe`` size in Windows.
    return ellipsize(marker, 79) + u'\n'
Esempio n. 4
0
def _response_marker(response, resp_i):
    return ellipsize(u'------------ response %d : %d %s' % (
                        resp_i,
                        response.status,
                        printable(find_reason_phrase(response)))) + u'\n'
Esempio n. 5
0
def _response_marker(response):
    return ellipsize(u'------------ response: %d %s' % (
                        response.status,
                        printable(find_reason_phrase(response)))) + u'\n'