Re: WSGIRequest should set request.path to full uri path

2007-07-31 Thread SmileyChris
I'm no expert in this area, but perhaps we could use a thread-local middleware to keep request handy? Sort of like this wiki solution [1] but put the whole request into _thread_locals. Would there be any performance downside in doing that? Is it safe to do that? This would solve the reverse URL

Re: WSGIRequest should set request.path to full uri path

2007-07-29 Thread SmileyChris
On Jul 29, 10:19 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Reverse URL construction (especially w.r.t things like HTTP > redirects) is the big missing part. We obviously need some way to get the SCRIPT_NAME from request to the reverse resolver. Can we rely on SCRIPT_NAME remaining a con

Re: WSGIRequest should set request.path to full uri path

2007-07-29 Thread Graham Dumpleton
On Jul 29, 10:30 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-07-28 at 23:20 +, Graham Dumpleton wrote: > > [...] > > > FWIW, I know I said that SCRIPT_NAME can't be calculated in > > mod_python. Well, that isn't strictly true. > > > If you are using mod_python 3.3.1 and ha

Re: WSGIRequest should set request.path to full uri path

2007-07-28 Thread Jacob Kaplan-Moss
On 7/28/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Haven't worked out exactly how to acommodate things like mod_python not > giving the full SCRIPT_NAME yet, but it's a relatively minor issue since > it's just a fact of life we need to work around. Something will present > itself. I'm no

Re: WSGIRequest should set request.path to full uri path

2007-07-28 Thread Malcolm Tredinnick
On Sat, 2007-07-28 at 23:20 +, Graham Dumpleton wrote: [...] > FWIW, I know I said that SCRIPT_NAME can't be calculated in > mod_python. Well, that isn't strictly true. > > If you are using mod_python 3.3.1 and have used the Location directive > then it is probably possible by using req.hlist

Re: WSGIRequest should set request.path to full uri path

2007-07-28 Thread Graham Dumpleton
On Jul 29, 8:19 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-07-27 at 05:11 +, SmileyChris wrote: > > Sorry bout the unfinished second half of that last message, I was just > > thinking through type and I meant to delete it before posting. > > > On Jul 27, 4:16 pm, Graham D

Re: WSGIRequest should set request.path to full uri path

2007-07-28 Thread Malcolm Tredinnick
On Fri, 2007-07-27 at 05:11 +, SmileyChris wrote: > Sorry bout the unfinished second half of that last message, I was just > thinking through type and I meant to delete it before posting. > > On Jul 27, 4:16 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > The other problem is that altho

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread SmileyChris
On Jul 27, 5:09 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > It sounds like you are saying then that the base.py change results in > what I refer to as the desirable behaviour for urls.py. Exactly. That change ensures that the url (forward) resolver doesn't need to worry about SCRIPT_NAME (i

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread SmileyChris
Sorry bout the unfinished second half of that last message, I was just thinking through type and I meant to delete it before posting. On Jul 27, 4:16 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > The other problem is that although with the better WSGI adapters > SCRIPT_NAME is provided correc

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread Graham Dumpleton
On Jul 27, 2:49 pm, SmileyChris <[EMAIL PROTECTED]> wrote: > On Jul 27, 4:16 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > Ahh, I read the way the patch was being applied the wrong way > > around. :-( > > > Anyway, one potential reason why using req.uri may be bad is that > > Apache does

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread SmileyChris
On Jul 27, 4:16 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Ahh, I read the way the patch was being applied the wrong way > around. :-( > > Anyway, one potential reason why using req.uri may be bad is that > Apache does not do complete normalisation on it. Thus, one can get > repeating slash

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread Graham Dumpleton
On Jul 27, 1:32 pm, SmileyChris <[EMAIL PROTECTED]> wrote: > On Jul 27, 2:51 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > On Jul 27, 12:34 pm, SmileyChris <[EMAIL PROTECTED]> wrote: > > > > Reading through the mod_wsgi docs [1], I came to a section explaining > > > a problem with Dj

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread SmileyChris
On Jul 27, 2:51 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Jul 27, 12:34 pm, SmileyChris <[EMAIL PROTECTED]> wrote: > > > Reading through the mod_wsgi docs [1], I came to a section explaining > > a problem with Django's core HTTP handling (search for "SCRIPT_NAME"). > > > I have reopen

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread Graham Dumpleton
Here is last time this was discussed. http://groups.google.com/group/django-developers/browse_frm/thread/19cd0976a3010cba/5329aeb3960ceb70?lnk=gst&q=SCRIPT_NAME&rnum=2#5329aeb3960ceb70 Graham On Jul 27, 12:51 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Jul 27, 12:34 pm, SmileyChris <[E

Re: WSGIRequest should set request.path to full uri path

2007-07-26 Thread Graham Dumpleton
On Jul 27, 12:34 pm, SmileyChris <[EMAIL PROTECTED]> wrote: > Reading through the mod_wsgi docs [1], I came to a section explaining > a problem with Django's core HTTP handling (search for "SCRIPT_NAME"). > > I have reopened #285 [2] and attached a patch which seemingly fixes > this. Could I pleas

WSGIRequest should set request.path to full uri path

2007-07-26 Thread SmileyChris
Reading through the mod_wsgi docs [1], I came to a section explaining a problem with Django's core HTTP handling (search for "SCRIPT_NAME"). I have reopened #285 [2] and attached a patch which seemingly fixes this. Could I please have some people more expert than me check it out and provide some