Redirection 301 different behavior between versions

Hi, I have different redirection behavior between version 2.12.4 and 2.18.3:

Version 2.18.3 redirects POST method to GET after 301.
Version 2.12.4 get POST data directly without redirection ???

URL: http://www.eddyseverything.com/
POST data:
{'_post_id': '5',
 '_referer': '/used-vehicles/',
 'action': 'im_ajax_call',
 'make[]': 'Acura',
 'model[]': 'MDX',
 'page': '1',
 'perform': 'get_results',
 'show_all_filters': 'false'}


```
import requests
session = requests.Session()
'"num_rows"' in session.post('http://www.eddyseverything.com/', {'_post_id': '5', '_referer': '/used-vehicles/', 'action': 'im_ajax_call', 'make[]': 'Acura', 'model[]': 'MDX', 'page': '1', 'perform': 'get_results', 'show_all_filters': 'false'}).text
'"num_rows"' in session.post('http://www.eddyseverything.com/', {'_post_id': '5', '_referer': '/used-vehicles/', 'action': 'im_ajax_call', 'make[]': 'Acura', 'model[]': 'MDX', 'page': '1', 'perform': 'get_results', 'show_all_filters': 'false'}).text
```

First POST request is false for both versions, but it must store some kind of data into session, and second request has a different behavior:
2.12.4 is True
2.18.1 and 2.18.3 is False

Version 2.12.4:
```
In [1]: import requests
   ...: session = requests.Session()
   ...: session.get('http://www.eddyseverything.com/')
   ...: '"num_rows"' in session.post('http://www.eddyseverything.com/', {'_post_id': '5', '_referer': '/used-vehicles/', 'action': 'im_ajax_call', 'make[]': 'Acura', 'model[]': 'MD
   ...: X', 'page': '1', 'perform': 'get_results', 'show_all_filters': 'false'}).text
   ...: 
2017-08-10 12:17:01,210 : DEBUG : requests.packages.urllib3.connectionpool : Starting new HTTP connection (1): www.eddyseverything.com
2017-08-10 12:17:01,619 : DEBUG : requests.packages.urllib3.connectionpool : http://www.eddyseverything.com:80 "GET / HTTP/1.1" 301 240
2017-08-10 12:17:01,623 : DEBUG : requests.packages.urllib3.connectionpool : Starting new HTTPS connection (1): www.eddyseverything.com
2017-08-10 12:17:02,082 : DEBUG : requests.packages.urllib3.connectionpool : https://www.eddyseverything.com:443 "GET / HTTP/1.1" 200 None
2017-08-10 12:17:02,306 : DEBUG : requests.packages.urllib3.connectionpool : https://www.eddyseverything.com:443 "POST / HTTP/1.1" 200 None
Out[1]: True
```

Version 2.18.1:
```
In [1]: import requests
   ...: session = requests.Session()
   ...: session.get('http://www.eddyseverything.com/')
   ...: '"num_rows"' in session.post('http://www.eddyseverything.com/', {'_post_id': '5', '_referer': '/used-vehicles/', 'action': 'im_ajax_call', 'make[]': 'Acura', 'model[]': 'MD
   ...: X', 'page': '1', 'perform': 'get_results', 'show_all_filters': 'false'}).text
   ...: 
2017-08-10 19:17:30,886 : DEBUG : urllib3.connectionpool : Starting new HTTP connection (1): www.eddyseverything.com
2017-08-10 19:17:31,203 : DEBUG : urllib3.connectionpool : http://www.eddyseverything.com:80 "GET / HTTP/1.1" 301 240
2017-08-10 19:17:31,209 : DEBUG : urllib3.connectionpool : Starting new HTTPS connection (1): www.eddyseverything.com
2017-08-10 19:17:31,808 : DEBUG : urllib3.connectionpool : https://www.eddyseverything.com:443 "GET / HTTP/1.1" 200 None
2017-08-10 19:17:32,177 : DEBUG : urllib3.connectionpool : http://www.eddyseverything.com:80 "POST / HTTP/1.1" 301 240
2017-08-10 19:17:32,339 : DEBUG : urllib3.connectionpool : https://www.eddyseverything.com:443 "GET / HTTP/1.1" 200 None
Out[1]: False
```

Given that these two requests are plaintext, can you use tools like wire shark to compare the two HTTP requests that we're making?

However, I think we might be bumping into a concern around the 301 cache here.

I think our current behaviour is more correct though, so I don't think this is a bug

I agree, new behavior is better because second request in old version is done to HTTPS instead of HTTP as in given URL.
Anyway I think that must be a parameter to keep POST method after redirection.

> Anyway I think that must be a parameter to keep POST method after redirection.

I disagree. :smile:

POST -> 301 -> GET is a very common pattern. It's so common that RFC 7231 notes that it's a thing that can happen, and it's what all browsers do. We're just keeping in place with the standard behaviour. If you'd like to override it, you can set `allow_redirects=False` and process the redirect yourself.