Permalink
Browse files

Handle potential multiple values for X-Requested-With.

If any are XMLHttpRequest, we return true for ajax_?.
  • Loading branch information...
Shadowfiend committed Apr 7, 2012
1 parent 4cc150c commit fca7cdf8030ee4056f0fe6409fbd93edc8d77d54
Showing with 1 addition and 1 deletion.
  1. +1 −1 web/webkit/src/main/scala/net/liftweb/http/Req.scala
@@ -855,7 +855,7 @@ class Req(val path: ParsePath,
def ajax_? =
request.headers.toList.exists { header =>
(header.name equalsIgnoreCase "x-requested-with") &&
- (header.value equalsIgnoreCase "xmlhttprequest")
+ (header.values.exists(_ equalsIgnoreCase "xmlhttprequest"))
}
/**

0 comments on commit fca7cdf

Please sign in to comment.