title: Spring MVC using @RequestParam with RequestMethod.DELETE on Tomcat 6.0.35
body: <p>I have a simple method (running on Tomcat 6.0.35) that looks like so:</p>
  
  <pre><code>@RequestMapping(value = "/bla/d", method = RequestMethod.DELETE)
  @ResponseStatus(HttpStatus.NO_CONTENT)
  public void d(@RequestParam String d){
      //logic here
  }
  </code></pre>
  
  <p>When I send a DELETE request with post like parameters (d=gggg in the body) I get a 400 Bad Request.
  But if  I change it to </p>
  
  <pre><code>@RequestMapping(value = "/bla/d", method = RequestMethod.POST)
  @ResponseStatus(HttpStatus.NO_CONTENT)
  public void d(@RequestParam String d){
      //logic here
  }
  </code></pre>
  
  <p>It works perfectly.
  I was using a Firefox Add-on to test it (and python and Spring's RestTemplate with same result) here's how the request look with POST(a is a cope pasted method named a with parameter a):</p>
  
  <pre><code>POST /bla/a HTTP/1.1
  Host: ~~~~:8080
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Encoding: gzip, deflate
  Connection: keep-alive
  Content-Type: application/x-www-form-urlencoded; charset=UTF-8
  Content-Length: 7
  Pragma: no-cache
  Cache-Control: no-cache
  a=asdas
  
  HTTP/1.1 204 No Content
  Server: Apache-Coyote/1.1
  Date: Tue, 12 Jun 2012 09:29:46 GMT
  </code></pre>
  
  <p>And delete looks like:</p>
  
  <pre><code>DELETE /bla/d HTTP/1.1
  Host: ~~~~~:8080
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Encoding: gzip, deflate
  Connection: keep-alive
  Content-Type: application/x-www-form-urlencoded; charset=UTF-8
  Content-Length: 7
  d=asdas
  
  HTTP/1.1 400 Bad Request
  Server: Apache-Coyote/1.1
  Content-Type: text/html;charset=utf-8
  Content-Length: 971
  Date: Tue, 12 Jun 2012 09:30:04 GMT
  Connection: close
  </code></pre>
  
  <p>Please help me, I might be missing something stupid but I just can't see it.
  My original problem was sending an array via post-like body with DELETE request but it seems that something more basic is wrong.</p>