title: Spring with Tomcat 7: PUT request returns 403 for strange resons
body: <p>I have a web application written on Spring 3.1 (not boot) and running on Tomcat 7.</p>
  <p>I have a @Controller implements method PUT on a certain URL.
  In some cases When sending a PUT request from Postman, I get a 403 response instead of what is expected.</p>
  <p>For example:</p>
  <ol>
  <li>Sending the request to a non-implemented URL (on GET to the same URL I get a 404)</li>
  <li>Sending an invalid JSON as the request body (Expected 400)</li>
  <li>Sending a string instead of a numeric request parameter (Expected 400)</li>
  </ol>
  <p>I also implement a filter that excepts all requests and just before the filter exists, I can verify I get the expected status from the rest of the chain.</p>
  <p>This is an example of a controller code:</p>
  <pre><code>@RequestMapping(value = &quot;/{book}&quot;, method = RequestMethod.PUT)
  @ResponseStatus(HttpStatus.OK)
  @ResponseBody
  protected Book put(@PathVariable(value = &quot;bookId&quot;) String id, @RequestBody @Valid Book book) {
      return book;  // just a stub
  }
  </code></pre>
  <p>And this is the relevant part in the filter:</p>
  <pre><code>filterChain.doFilter(req, res);
  // res.getStatus() is the expected status
  return; // after this line I move to internal code of Tomcat which I cannot debug, but something happens there.
  </code></pre>
  <p>What do I miss?</p>
  <p>Thanks</p>