Currently there is no way to forbid follow redirects in the http condition (org.apache.tools.ant.taskdefs.condition.Http). It would be good to have some property to turn off follow redirects to be able to check result when response status code is 302.
added with git commit c78ecf7