Announcement Announcement Module
No announcement yet.
Spport for request method 'HEAD' Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spport for request method 'HEAD'

    I was wondering if there is a final solution (decision) on how we should add the HEAD request default behavior to a controller.

    @RequestMapping(value={"/"}, method={RequestMethod.GET,RequestMethod.HEAD}) will send the same response for HEAD and GET request. The HEAD response body will not be empty, which is not ideal.

    For the moment I'm using another function for the HEAD request and I'm sending an empty body. It is working but I was wondering if there is a better way to do this.

    Older Threads on the same subject: