Redirecting to locations containing a parent or current directory reference #172

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

neilb14 commented Nov 11, 2012

I was having some problems with redirects on a site that redirected to locations using parent and current directory references. This pull request contains a small change to handle those types of locations.

Neil.

+
+ it "redirects if a 300 contains a relative location header with a current directory path" do
+ redirect = stub_response '', 300
+ redirect['location'] = './foo/bar'
@jnunemaker

jnunemaker Jan 1, 2013

Owner

Is this actually legal according to RFCs?

@neilb14

neilb14 Jan 1, 2013

Nope, should be absolute but I've run across it and browsers respond accordingly.

+ end
+
+ it "redirects if a 300 contains a relative location header with a current directory path" do
+ redirect = stub_response '', 300
@jnunemaker

jnunemaker Jan 1, 2013

Owner

Does 300 response even matter? Really this test is more about a redirect with current directory path.

Owner

jnunemaker commented Apr 10, 2013

Not really sure what to do with this, so I'm closing. Feel free to re-open if you/anyone feel really passionate about it and can explain it a bit more to me.

@jnunemaker jnunemaker closed this Apr 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment