Re: Small problem with HttpResponseRedirect

2011-12-07 Thread Cal Leeming [Simplicity Media Ltd]
After reading all the comments, I now completely agree that Django is doing the right thing and it falls onto the user to do sanity checking. Always helps to have another set of eyes, so thank you to everyone who took time to post their thoughts! Cal On Tue, Dec 6, 2011 at 7:54 AM, Paul McMillan

Re: Small problem with HttpResponseRedirect

2011-12-05 Thread Paul McMillan
As Ian said, Django does the right thing here according to my tests too, and generates the absolute URIs required by RFC 2616. If you've figured out some way to actually get location headers that are noncompliant, that would be a bug, but the handling of // is correct. -Paul -- You received this

Re: Small problem with HttpResponseRedirect

2011-12-05 Thread Ian Clelland
On Mon, Dec 5, 2011 at 2:00 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Not sure if this should have a bug ticket raised or not.. wanted to get > core devs thoughts. > > > _redir = "//your/path/with/an/extra/slash/for/whatever/reason" > HttpResponseRedir

Re: Small problem with HttpResponseRedirect

2011-12-05 Thread Yaşar Arabacı
To be more spesific: "Following the syntax specifications in *RFC 1808*, urlparse recognizes a netloc only if it is properly introduced by '//'. Otherwise the input is presumed to be a relative URL and thus to start with a path component." 6 Aralık 2011 04

Re: Small problem with HttpResponseRedirect

2011-12-05 Thread Yaşar Arabacı
Maybe this is about second example in here: http://docs.python.org/library/urlparse.html#urlparse.urlparse ? 2011/12/6 Luciano Pacheco > On Tue, Dec 6, 2011 at 9:00 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Not sure if this should have a bug tic

Re: Small problem with HttpResponseRedirect

2011-12-05 Thread Luciano Pacheco
On Tue, Dec 6, 2011 at 9:00 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Not sure if this should have a bug ticket raised or not.. wanted to get > core devs thoughts. > > > _redir = "//your/path/with/an/extra/slash/for/whatever/reason" > HttpResponseRedir

Re: Small problem with HttpResponseRedirect

2011-12-05 Thread Adrian Holovaty
On Mon, Dec 5, 2011 at 4:00 PM, Cal Leeming [Simplicity Media Ltd] wrote: > _redir = "//your/path/with/an/extra/slash/for/whatever/reason" > HttpResponseRedirect(_redir) > returns "Location: http://your/path/with/an/extra/slash/for/whatever/reason"; > > _redir = "/your/path/with/no/extra/slash" >

Small problem with HttpResponseRedirect

2011-12-05 Thread Cal Leeming [Simplicity Media Ltd]
Not sure if this should have a bug ticket raised or not.. wanted to get core devs thoughts. _redir = "//your/path/with/an/extra/slash/for/whatever/reason" HttpResponseRedirect(_redir) returns "Location: http://your/path/with/an/extra/slash/for/whatever/reason"; _redir = "/your/path/with/no/extra