added @connected attribute and connected? method to HttpConnection to be able to test if our connection has been terminated