Module httplib :: Class HTTPResponse
[show private | hide private]
[frames | no frames]

Class HTTPResponse


Method Summary
  __init__(self, sock, debuglevel, strict, method)
  begin(self)
  close(self)
  getheader(self, name, default)
  getheaders(self)
Return list of (header, value) tuples.
  isclosed(self)
  read(self, amt)
  _check_close(self)
  _read_chunked(self, amt)
  _read_status(self)
  _safe_read(self, amt)
Read the number of bytes requested, compensating for partial reads.

Method Details

getheaders(self)

Return list of (header, value) tuples.

_safe_read(self, amt)

Read the number of bytes requested, compensating for partial reads.

Normally, we have a blocking socket, but a read() can be interrupted by a signal (resulting in a partial read).

Note that we cannot distinguish between EOF and an interrupt when zero bytes have been read. IncompleteRead() will be raised in this situation.

This function should be used when <amt> bytes "should" be present for reading. If the bytes are truly not available (due to EOF), then the IncompleteRead exception can be used to detect the problem.

Generated by Epydoc 2.1 on Tue Apr 4 14:32:57 2006 http://epydoc.sf.net