Re: segfault on xpath queries :P
emf <syncato-IT4L295iNO/[email protected]> Tue, 4 May 2004 12:48:58 -0400
| Newsgroups | gmane.comp.web.syncato.general |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-5-155439840
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
On May 4, 2004, at 12:40, darryl wrote:
> Can we see the code that goes with the caveats?
sure. This is a patch for dist/servlets/restricted/Main.py - the main
ugly thing is len('/WK/blog'), which could probably be replaced by
looking in the config, and maybe the SCRIPT_NAME thing mentioned in my
prior patch works consistently if you're not dumb like I was and made
<Location /> be where you plopped your webware handler, but i haven't
quite tested that out yet.
Also the "if pathInfo is '/': pathInfo = ''" line is probably
superfluous.
--
honi soit qui mal y pense
~mindlace http://mindlace.net
--Apple-Mail-5-155439840
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="Main.py.diff"
Content-Disposition: attachment;
filename=Main.py.diff
12a13
> from urllib import unquote
36,38c37,44
<
< pathInfo = request.extraURLPath()
<
---
> #eeevil hack.
> pathInfo = request._environ['REQUEST_URI'][len('/WK/blog'):]
> isquery = pathInfo.find('?')
> if isquery != -1: pathInfo = pathInfo[:isquery]
> pathInfo = unquote(pathInfo)
> if pathInfo is '/': pathInfo = ''
> # pathInfo = request.extraURLPath()
>
--Apple-Mail-5-155439840--
-------------------------------------------------------
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