On Jan 1, 2011, at 10:12 AM, Arun K.Rajeevan wrote: > I set, routes_apps_raw=['init'] > > and modified controllers to use request.raw_args > Now my controllers are working fine. > > But it caused two new problems :related to download and login > > 1) def download(): > return response.download(request,db) > > since above will not work when routes_apps_raw is set, I modified it to > > def download(): > import os, time > filename = > os.path.join(request.folder,'uploads',request.raw_args.split('/')[0]) > return response.stream(open(filename,'rb')) > > Now it displays images in webpage, but I've a option to download picture. > using default download method, it used to open a file save dialog but, now it > displays picture in browser (in encoded form, hence 'garbage' ) > > what should I add to my custom download function to work properly. >
See my earlier message on this subject. > 2) Login form is not working anymore. > Browser reports 'too many redirects' when I try to access login or > registration forms and such. > > what went wrong? How to fix it? In default.user, process request.raw_args into request.args, and perform the standard check on each arg. This will be easier in the new system (this is good feedback; thanks). Tentatively: raw_args will be a list of raw args, rather than a string, and will always be there. args will be a list of validated args, as now, but if args-checking is disabled, I'll silently replace any invalid arg in args with None.