title: Java URLConnection returns null for valid URL
body: <p>I've been collecting stock market data for a project, and have been doing so for the past few months. However, as of a couple of days ago the URLConnection I've been using to download data from Yahoo has been null, despite having made no changes and it having worked perfectly before that. The URL from Yahoo downloads a csv file which I read and print out, and the URL is valid and works if I go to it on my browser, yet when I connect to it in my code, the URLConnection is null. Trying with other stocks also hasn't helped.</p>
  
  <pre><code>private URL url = null;
  private URLConnection urlConn = null;
  private InputStreamReader  inStream = null;
  try {
          //http://ichart.finance.yahoo.com/table.csv?s=^FTSE&amp;d=3&amp;e=18&amp;f=2017&amp;g=d&amp;a=1&amp;b=14&amp;c=2017
          this.url  = new URL(urlStr);
                      System.out.println(url.toString());
          this.urlConn = url.openConnection();
          this.urlConn.connect();
  
          //Start Reading
          this.inStream = new InputStreamReader(this.urlConn.getInputStream());
          BufferedReader buff= new BufferedReader(this.inStream);
          System.out.println(buff.readLine());
  }catch (MalformedURLException e) {
          System.out.println(e.getMessage());
  }catch(IOException e){
          System.out.println(e.getMessage()); 
  }
  </code></pre>