Mercurial > hg > uploader
changeset 6:d2990750e5d6
fix the way query string works
author | k0s <k0scist@gmail.com> |
---|---|
date | Sun, 27 Dec 2009 16:35:48 -0500 |
parents | 04a77bdafaec |
children | a8c60480fce0 |
files | setup.py uploader/dispatcher.py uploader/handlers.py |
diffstat | 3 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Sun Dec 27 16:30:38 2009 -0500 +++ b/setup.py Sun Dec 27 16:35:48 2009 -0500 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = "0.2.1" +version = "0.2.2" setup(name='uploader', version=version,
--- a/uploader/dispatcher.py Sun Dec 27 16:30:38 2009 -0500 +++ b/uploader/dispatcher.py Sun Dec 27 16:35:48 2009 -0500 @@ -24,10 +24,7 @@ self.auth = self.auth.lower() == 'true' self.subpath = self.subpath.lower() == 'true' if self.subpath: - if self.query_string: - self.handlers = [ SubpathGet, SubpathPost ] - else: - self.handlers = [ SubpathPost ] + self.handlers = [ SubpathGet, SubpathPost ] else: self.handlers = [ Get, Post ]
--- a/uploader/handlers.py Sun Dec 27 16:30:38 2009 -0500 +++ b/uploader/handlers.py Sun Dec 27 16:35:48 2009 -0500 @@ -62,9 +62,9 @@ @classmethod def match(cls, app, request): - if request.method != 'GET' or not app.query_string: + if request.method != 'GET': return False - if app.query_string not in request.GET: + if app.query_string and (app.query_string not in request.GET): return False _path = path(app.directory, request) if os.path.exists(_path) and os.path.isdir(_path):