[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-web-sig
Subject:    [Web-SIG] Converting REQUEST_URI to wsgi.script_name/wsgi.path_info
From:       Ian Bicking <ianb () colorstudy ! com>
Date:       2009-09-28 3:35:12
Message-ID: b654cd2e0909272035g638a3e4bhe2ae461bf72d7199 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I tried implementing some code to convert REQUEST_URI (the raw request URL)
and CGI-style SCRIPT_NAME/PATH_INFO into a raw script_name/path_info.
  http://bitbucket.org/ianb/wsgi-peps/src/tip/request_uri.py (python 2)
  http://bitbucket.org/ianb/wsgi-peps/src/tip/request_uri3.py (python 3)

Admittedly the tests are not very complete, I just wasn't feeling creative
about test cases.  In terms of performance this avoids being entirely brute
force, but feels kind of complex.  I'm betting there's an entirely different
approach which is faster.  But whatever.

-- 
Ian Bicking  |  http://blog.ianbicking.org  |
http://topplabs.org/civichacker

[Attachment #5 (text/html)]

I tried implementing some code to convert REQUEST_URI (the raw request URL) and \
CGI-style SCRIPT_NAME/PATH_INFO into a raw script_name/path_info.<div><br></div><div> \
<a href="http://bitbucket.org/ianb/wsgi-peps/src/tip/request_uri.py">http://bitbucket.org/ianb/wsgi-peps/src/tip/request_uri.py</a> \
(python 2)</div>

<div>    <a href="http://bitbucket.org/ianb/wsgi-peps/src/tip/request_uri3.py">http://bitbucket.org/ianb/wsgi-peps/src/tip/request_uri3.py</a> \
(python 3)</div><div><br></div><div>Admittedly the tests are not very complete, I \
just wasn&#39;t feeling creative about test cases.   In terms of performance this \
avoids being entirely brute force, but feels kind of complex.   I&#39;m betting \
there&#39;s an entirely different approach which is faster.   But whatever.</div>

<div><br><div>-- <br>Ian Bicking   |   <a \
href="http://blog.ianbicking.org">http://blog.ianbicking.org</a>   |   <a \
href="http://topplabs.org/civichacker">http://topplabs.org/civichacker</a><br> \
</div></div>



_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/python-web-sig%40marc.info


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic