mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-18 03:21:07 +00:00
add HTTPConnection.is_idle(), print response in HTTPConnection.__str__()
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3446 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
ba7eaeae09
commit
7b39b6c1b6
1 changed files with 6 additions and 2 deletions
|
|
@ -594,8 +594,9 @@ class HTTPConnection:
|
||||||
self.strict = strict
|
self.strict = strict
|
||||||
|
|
||||||
def __str__ (self):
|
def __str__ (self):
|
||||||
return "<HttpConnection state=%s method=%s sock=%s buffer=%s>" % \
|
return "<HttpConnection state=%s\n method=%s\n" \
|
||||||
(self.__state, self._method, self.sock, self._buffer)
|
" sock=%s\n buffer=%s\n response=%s>" % \
|
||||||
|
(self.__state, self._method, self.sock, self._buffer, self.__response)
|
||||||
|
|
||||||
def _set_hostport(self, host, port):
|
def _set_hostport(self, host, port):
|
||||||
if port is None:
|
if port is None:
|
||||||
|
|
@ -895,6 +896,9 @@ class HTTPConnection:
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
def is_idle (self):
|
||||||
|
return self.__state == _CS_IDLE
|
||||||
|
|
||||||
# The next several classes are used to define FakeSocket,a socket-like
|
# The next several classes are used to define FakeSocket,a socket-like
|
||||||
# interface to an SSL connection.
|
# interface to an SSL connection.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue