beders/Resty — pull request #11 by wilfriedvanasten (2012-03-16 10:58:17+00:00)
Title: Added inputStream closes and empty response body on IOExceptio

Hello,

I have written patches that close inputStream for each of the Resources (I am not entirely sure about the location of the .close() for some of them so you might want to check that out) and in AbstractResource made sure that if getInputStream() throws an IOException the response body is emptied if it is a HTTPURLConnection.

Most of this was based on this document: http://docs.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html
and the knowledge that streams should be closed after use to free up resources

Similar documentation exists for the later java versions.

I also removed the .project and .classpath and updated .gitignore to reflect this (Since pom.xml has all the necessary information), but you may choose to ignore this commit if you want to.

Best Regards,

Wilfried van Asten