handle httplib.BadStatusLine error - fixes #23