325
325
% (code, msg, plaintext_body))
327
327
def _debug_cb(self, kind, text):
328
if kind in (pycurl.INFOTYPE_HEADER_IN, pycurl.INFOTYPE_DATA_IN,
329
pycurl.INFOTYPE_SSL_DATA_IN):
328
if kind in (pycurl.INFOTYPE_HEADER_IN, pycurl.INFOTYPE_DATA_IN):
330
329
self._report_activity(len(text), 'read')
331
330
if (kind == pycurl.INFOTYPE_HEADER_IN
332
331
and 'http' in debug.debug_flags):
333
332
mutter('< %s' % text)
334
elif kind in (pycurl.INFOTYPE_HEADER_OUT, pycurl.INFOTYPE_DATA_OUT,
335
pycurl.INFOTYPE_SSL_DATA_OUT):
333
elif kind in (pycurl.INFOTYPE_HEADER_OUT, pycurl.INFOTYPE_DATA_OUT):
336
334
self._report_activity(len(text), 'write')
337
335
if (kind == pycurl.INFOTYPE_HEADER_OUT
338
336
and 'http' in debug.debug_flags):
339
337
mutter('> %s' % text)
340
elif kind == pycurl.INFOTYPE_TEXT and 'http' in debug.debug_flags:
338
elif (kind in (pycurl.INFOTYPE_TEXT, pycurl.INFOTYPE_SSL_DATA_IN,
339
pycurl.INFOTYPE_SSL_DATA_OUT)
340
and 'http' in debug.debug_flags):
341
341
mutter('* %s' % text)
343
343
def _set_curl_options(self, curl):