title: Possible bug in ResourceHttpMessageConverter
body: <p>I've been experiencing a strange problem using the <code>ResourceHttpMessageConverter</code> in the latest Spring 3.2.4 version. I have an annotated controller that returns a <code>Resource</code>, in specific a <code>UrlResource</code>. This <code>UrlResource</code> is nothing more than a <code>Request</code> to another remote server that serves a pdf file. Usually the pdf is a small file (less than 1MB) but under some circumstances is larger. In case the file is large the client that contacts to my Controller can't download the file resulting in a connection closed error. The code I am using is the following</p>
  
  <pre><code>@Controller
  @PreAuthorize(value = "isAuthenticated()")
  public class TestController {
      @ResponseBody
      @RequestMapping(value="/report/", method = RequestMethod.GET, 
                      produces = "application/pdf")
      public Resource getReport() {
          //Ignore the getResource method, it is not the problem
          //this method returns an object of type UrlResource
          return this.getResource();
      }
  }
  </code></pre>
  
  <p>Although there is a workaround using the <code>StreamUtils</code> class to copy the <code>InputStream</code> from the <code>UrlResource</code> to the <code>OutputStream</code> of the <code>HttpServletResponse</code>, I wanted to know for sure if there is anything else I could do to avoid that, and rely on the Spring <code>MessageConverter</code> infrastructure rather than reimplementing the same logic in my controller. Is there any spring developer around that can point me in the right direction if it is possible, or if this is a bug let me know so I can report it. Thanks!</p>