I'm using the FileReference class to download files from a secure server. When the server does not detect a valid sessionid with a download request, it responds with an Http 302 error and redirects the request to the server login page, which then returns a 200 status code. The problem is the FileReference interprets this as a successful response when in effect the request has failed becuase whats returned is not the contents of the desired file but the html code for the login page!!
Is there any way the client can be configured to listen for the 302 and NOT get redirected to the login page? I want to trap this error and display an error message rather then ask the user to login.