On Aug 3, 2010, at 5:33 AM, Niphlod wrote:

> +1 for this method, is pretty standard in other frameworks too.
> Also, according to http://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... 

Reply via email to