Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

should change method to GET when following 303 redirect #11214

Closed
wkrsz opened this issue Apr 8, 2013 · 12 comments
Closed

should change method to GET when following 303 redirect #11214

wkrsz opened this issue Apr 8, 2013 · 12 comments
Labels

Comments

@wkrsz
Copy link

wkrsz commented Apr 8, 2013

When my server responds to PUT/DELETE with 303 redirect, PhantomJS follows the redirect with original request method. It correctly changes request method to GET after POST requests. Here's a snippet from my server log:

[127.0.0.1] Started DELETE "/clients/809315521/workflow_instances/122797022" for 127.0.0.1 at 2013-04-08 05:21:27 +0200
[127.0.0.1] Redirected to http://127.0.0.1:57228/clients/809315521/workflow_instances
[127.0.0.1] Completed 303 See Other in 24ms (ActiveRecord: 5.2ms)
[127.0.0.1] Started DELETE "/clients/809315521/workflow_instances" for 127.0.0.1 at 2013-04-08 05:21:28 +0200

RFC2616 states that:
The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource.
http://tools.ietf.org/html/rfc2616#section-10.3.4

@wkrsz
Copy link
Author

wkrsz commented Apr 26, 2013

XHR in Chrome, Safari, FF does change request method to GET on 303 redirects, as expected.

@wkrsz
Copy link
Author

wkrsz commented Jun 29, 2013

foreveralone

@schmilblick
Copy link

@WojtekKruszewski Haha, I stumbled over this issue when Googling for redirect issues with PhantomJS, you are not alone! 👍 :)

@wkrsz
Copy link
Author

wkrsz commented Jul 7, 2015

@schmilblick :D https://xkcd.com/979/

@jprince
Copy link

jprince commented Jul 14, 2015

👍

jprince pushed a commit to jprince/sleepers-and-keepers that referenced this issue Jul 14, 2015
This is a workaround needed to make the test for removing keepers (in league_manager_spec)
pass. There's currently a bug in PhantomJS (ariya/phantomjs#11214)
that causes PhantomJS to make a request for 303 redirect with the original request method,
in this case DELETE instead of a GET.
@villesundberg
Copy link

👍

@asok
Copy link

asok commented May 17, 2016

Yup I have the same when using poltergeist which is based on phantomjs.

@maxjustus
Copy link

👍

@liebig
Copy link

liebig commented Mar 31, 2017

Issue still exists!

@osgrob
Copy link

osgrob commented May 17, 2017

...and still exists

@jonathanpa
Copy link

and still still exists ...

@stale stale bot added the stale label Dec 26, 2019
@stale
Copy link

stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants