Problems with Twisted Web & non-standard file names...
Benjamin Schollnick <[email protected]> Fri, 16 Nov 2012 09:49:26 -0500
| Newsgroups | gmane.comp.python.twisted.web |
|---|---|
| Message-ID | <[email protected]> |
Folks,
I am in the process of writing, a "gallery" style web server application using twisted....
The main goal is to be able to browse, and access my image library, without having to add the files to a database, etc....
The issue I am having is with the URL processing....
Standard ASCII, and non-extended characters are working fine.... And I've tried using urllib.quote & urllib.quoteplus (along with unquote), to solve this problem....
But an URL with a dash (-) or number sign (#), or non-ASCII (eg 2012.7.1-撮影会- de die in diem) prevents it working...
The DASH or number sign will generally produce a 500 internal server error, non-ascii, will allow me to transverse to the directory, but the server fails to properly decode the URL, and none of the images work.....
What happens is....
Server side -
The Server decodes the request string, and transverse to the directory structure in the URL. For example, http://127.0.0.1:8888/albums/Television/B5/ would transverse into the albums / Television / B5 directory.... And http://127.0.0.1:8888/albums/Television/B5/ADVDEST.JPG?slideshow=1 would show the ADVDEST.JPG that is stored in the directory...
The issue I am having is that the POST request string is stopping at a single quote mark...
pre - ['albums']
post - ['anime', '(C54) [RPG']
RS /albums/anime/(C54) [RPG
/Volumes/DVR Storage/MMAP/gallery/sites
['albums']
POST ['anime', '(C54) [RPG']
ARGS {}
The directory name is (c54) [rpg' company (toumi haruka)] wedding bell (ah my goddess) [english][saha].
Any one have any suggestions on how to solve this? As I mentioned URLlib.quote_plus / unquote_plus don't seem to make a difference....
The one idea I had, was to send the web server an index, but that would be a pain, since you would not be able to type in the directory, as a shortcut... You would only be able to transverse via the web GUI....
- Benjamin
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web