We were doing POST->GET translation on 302 and 303, but we need to do
it on 301 as well to be compatible.
http://bugzilla.gnome.org/show_bug.cgi?id=586692
if (msg->status_code == SOUP_STATUS_SEE_OTHER ||
(msg->status_code == SOUP_STATUS_FOUND &&
- !SOUP_METHOD_IS_SAFE (msg->method))) {
+ !SOUP_METHOD_IS_SAFE (msg->method)) ||
+ (msg->status_code == SOUP_STATUS_MOVED_PERMANENTLY &&
+ msg->method == SOUP_METHOD_POST)) {
/* Redirect using a GET */
g_object_set (msg,
SOUP_MESSAGE_METHOD, SOUP_METHOD_GET,
{ "HEAD", "/302", 302 },
{ "HEAD", "/", 200 } } },
- /* POST should only automatically redirect on 302 and 303 */
+ /* POST should only automatically redirect on 301, 302 and 303 */
{ { { "POST", "/301", 301 },
+ { "GET", "/", 200 },
{ NULL } } },
{ { { "POST", "/302", 302 },
{ "GET", "/", 200 },