Re: xpath queries

emf <i-IT4L295iNO/[email protected]> Sun, 2 May 2004 18:39:54 -0400
Newsgroups gmane.comp.web.syncato.general
Message-ID <[email protected]>
--Apple-Mail-2-3696295
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

So far, I think it's apache doing it- path info has been "normalized" 
by the time webkit/syncato gets it. Anyway, the correct information is 
preserved in REQUEST_URI. So here is my "i have a deadline in a week" 
quick hack to fix the problem - I grab REQUEST_URI and SCRIPT_NAME from 
the _environ, ditch SCRIPT_NAME and any query string, and call the rest 
pathInfo.

Kimbro, are you using apache?


--Apple-Mail-2-3696295
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="Main.py.diff"
Content-Disposition: attachment;
	filename=Main.py.diff

36,38c36,41
<         
<         pathInfo = request.extraURLPath() 
<         
---
>         pathInfo = request._environ['REQUEST_URI']
>         pathInfo = pathInfo[len(request._environ['SCRIPT_NAME']):]
>         isquery = pathInfo.find('?')
>         if isquery != -1: pathInfo = pathInfo[:isquery]
>         # pathInfo = request.extraURLPath() 
> 

--Apple-Mail-2-3696295--



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click