thanks uploading
On Aug 3, 4:46 pm, Jonathan Lundell <jlund...@pobox.com> wrote: > On Aug 3, 2010, at 7:48 AM, Jonathan Lundell wrote: > > > > > On Aug 3, 2010, at 5:33 AM, Niphlod wrote: > > >> +1 for this method, is pretty standard in other frameworks too. > >> Also, according tohttp://www.w3.org/TR/XMLHttpRequest/#send, the > >> Accept header must be set as '*/*'. > > >> (and I think that there is one too much "lower()"), : > > >> ... > >> if request.env.http_x_requested_with.lower()=='xmlhttprequest': > >> ... > > > Also too many ifs. > > > return request.env.http_x_requested_with and > > request.env.http_x_requested_with.lower() == 'xmlhttprequest' > > > or something like that... > > Idle thought (slow afternoon): str(request.env.http_x_requested_with).lower() > == 'xmlhttprequest'