<html>
    <head>
      <base href="http://icedtea.classpath.org/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FileURLConnection inputstream isn't closed"
   href="http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1695">1695</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FileURLConnection inputstream isn't closed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>IcedTea
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6-1.13.1
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86_64
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>IcedTea
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>gnu.andrew&#64;redhat.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>stephan.meisinger&#64;opitec.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>unassigned&#64;icedtea.classpath.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>if an application calls getHeaderField(String) in
org.jboss.net.protocol.file.FileURLConnection 
an FileInputStream is generated. The handle stays open as a member variable. 

If the Connection is closed -&gt; the handle stays open. 

so please overload the method 
void close() {
 super(close);
 if(is != null) {
   is.close();
 }
}

This could be a unintended functional change and could be avoided by adding a
flag &quot;isStreamRead&quot;. This flag is set to true when stream is returned by 

public synchronized InputStream getInputStream();

void close() {
 super(close);
 if(is != null &amp;&amp; !isStreamRead) {
   is.close();
 }
}

This is issue is also available in IceTea7.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>