title: Sending custom Content-Type with ResponseEntity<Resource>
body: <p>I am trying to use the ResponseEntity return type in my Spring WebMVC 3.0.5 controller. I am returning an image, so I want to set the Content Type to image/gif with the following code:</p>
  
  <pre><code>@RequestMapping(value="/*.gif")
  public ResponseEntity&lt;Resource&gt; sendGif() throws FileNotFoundException {
      HttpHeaders headers = new HttpHeaders();
      headers.setContentType(MediaType.IMAGE_GIF);
      return new ResponseEntity&lt;Resource&gt;(ctx.getResource("/images/space.gif"), headers, HttpStatus.OK);
  }
  </code></pre>
  
  <p>However, the return type is being overridden to text/html in ResourceHttpMessageConverter.</p>
  
  <p>Other than implementing my own HttpMessageConverter and injecting this into the AnnotationMethodHandlerAdapter, is there any way for me to force the Content-Type?</p>