title: HTTP: POST request receives a 302, should the redirect-request be a GET?
body: <p>I was reading <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3">this</a> but I didn't really got from there what request-type the redirect-request should have in what case, i.e. the function (initial request-type, response-type) -> redirect-request-type.</p>
  
  <p>In my particular case, I had:</p>
  
  <ul>
  <li>initial request-type: POST</li>
  <li>response-type: 302</li>
  </ul>
  
  <p>Google Chrome used a GET for the redirected request.</p>
  
  <p>In the Python library <a href="https://github.com/kennethreitz/requests">requests</a>, there is the following code (<a href="https://github.com/kennethreitz/requests/blob/develop/requests/models.py">here</a>):</p>
  
  <pre><code># http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
  if r.status_code is codes.see_other:
      method = 'GET'
  else:
      method = self.method
  </code></pre>
  
  <p>I.e., the redirect-request-type is GET in case of 303 (<code>codes.see_other</code>), in all other cases it is the initial request-type. I.e., for my particular case above, it would be POST, in contrast to Chrome.</p>
  
  <p>This is probably wrong because I have one website where this actually doesn't seem to work correct (i.e. the website doesn't behave well this way).</p>
  
  <p>What would be the correct way/function?</p>