[Geoserver-users] Openlayers.request API calls to GeoServer does not Re-Direct When Session Expires

Hi All,

We’re having trouble with using GeoServer with our authentication server. After the browser’s GeoServer session cookie has expired, we expect any requests made to GeoServer to return a 302 and re-direct our app to the login page. This is true in the case where we use any normal ajax request library to make the call. However, when we use Openlayers.request.POST, the response that arrives in our success handler function has a status of 200 and the response text is the login page HTML. We would expect that it would be a 302 and that it re-directs in this case.

The only solution we have found is to wrap all the OpenLayers.request calls in a regular ajax call to GeoServer (/wms?REQUEST=GetFeatureInfo) first. This will re-direct our app to the login page in cases of 302’s and will make the Openlayers.request call in case of 200’s. But our solution has the overhead of that extra call.

We are hoping someone here may have a more eloquent solution.

Thanks

Brandon