| Summary: | ResourceHandle.getContent does not close response when HTTP error 404 occurs | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Michal Dobisek <dobisekm> |
| Component: | WebDAV | Assignee: | Platform-WebDAV-Inbox <platform-webdav-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ondrej.chylik |
| Version: | 3.0 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
This component is no longer being actively developed. We encourage users to investigate the capabilities of the Eclipse Web Tools Project. |
The getContent method closes the response only when IOException occurs, but when the WebDAVException is thrown by examineReposnse (e.g. for err404), then the response remains open. This patch fixes the bug: Index: org/eclipse/webdav/client/AbstractResourceHandle.java =================================================================== RCS file: /home/eclipse/org.eclipse.webdav/src/client/org/eclipse/webdav/client/Abst ractResourceHandle.java,v retrieving revision 1.17 diff -u -r1.17 AbstractResourceHandle.java --- org/eclipse/webdav/client/AbstractResourceHandle.java 17 Apr 2004 21:12:07 -0000 1.17 +++ org/eclipse/webdav/client/AbstractResourceHandle.java 3 Nov 2004 16:38:35 -0000 @@ -418,7 +418,10 @@ } catch (IOException e) { closeResponse(response); throw new SystemException(e); - } + } catch (DAVException e) { + closeResponse(response); + throw e; + } return new ResponseInputStream(response); }