handle EOFError in HTTPClient

Raised for invalid SSL certificate on JRuby