echo the query when responding to non-js request