On Mon, Jul 02, 2001 at 05:37:16PM -0700, Jon Stevens wrote:
> > Putting a "return;" does not prevent the finally{} of
> > the try block from executing if that is what was
> > thought by not putting it there. So the RunData will
> > get added back to the cache regardless.
> > 
> > What was intended by not putting a "return;" here and
> > is it a potential bug?
> 
> There is a case where a redirect header will get ignored by older (2.x?)
> browsers. In that case, it is a good idea to output a HTML page with a link
> in it so that people can click on it to continue.

Well Peter,

As Jon says, the redirect response should contain an HTML page with a
link in it, at least. This is not just for different browsers but for
non-browsers such as mirroring software. The mirroring software may be
told not to follow redirects that do or do not match certain servers or
paths. However, it is still valuable to have the link present so that an
end user can access the resource that was not mirrored. Of course, this
may not apply to your web application if it is for in-house purposes
only.

Nevertheless, I think it is the right thing to do if you are being
a "good citizen". So, imagine a page which looks like a 404 Not Found
page but which is instead a 302 Found page with a URL in it. If
you're using redirects then consider making a screen for this called
Redirect.vm (or whatever templating mechanism you use) that simply
outputs an HTML link with the message "This resource may be found at..."
or something. Then before your setRedirectURI, invoke setTemplate as
appropriate. Some browsers may use this as a fallback page if the
resource to which you have redirected them is not accessible (eg. a
server is down, etc.).

As a point of interest you can consider that if a client requests a
resource x and you redirect them using 302 to a resource y which is an
image/gif, for instance, the 302 response should actually be text/html
page. It is then up to the browser to make use of the 302 response
headers to access resource y. So your response to a request for x
would actually be a text/html, not image/gif.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to