title: Symfony returns 301 on requested url by cUrl
body: <p>So, i have REST api on my project</p>
  
  <p>I am trying to make request to API with cUrl. But Symfony returns 301</p>
  
  <p>routing:</p>
  
  <pre><code>CMContestBundle_api_new:
  type: rest
  pattern:  /{_locale}/api/contest/new/
  defaults: { _controller: CMContestBundle:API:new, _locale: en }
  requirements:
      _method: GET
  </code></pre>
  
  <p>security</p>
  
  <pre><code>- { path: ^/(en|no|dk|se|es|it|pl)/api/contest/new, role: IS_AUTHENTICATED_ANONYMOUSLY, methods : GET }
  </code></pre>
  
  <p>curl request</p>
  
  <pre><code>curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET  http://localhost/app_dev.php/en/api/contest/new
  </code></pre>
  
  <p>when i enter this url in browser - everything is ok. but if this is curl request it returns 301 and html page which redirects on requested url</p>
  
  <p>any ideas why symfony returns 301 instead of right response?</p>