[Simpleweb-Support] RFE: Response.redirect()
Brought to you by:
niallg
From: David F. <da...@da...> - 2004-12-28 19:20:57
|
Hi, I'd like to request a convenience method for issuing HTTP redirects. Something like Response.redirect(String url). In general, the Request and Response interfaces seem to fully capture the power of the HTTP protocol, but using them requires knowledge of that protocol. So far, I've had to refer to the protocol twice now: to find the spelling of the Referer field and to look up the 302 redirect response code and the Location header. Have you made the conscious choice to require knowledge of the HTTP protocol in order to use Simple effectively? Or do you plan to add convenience methods for querying things like referrers and performing common techniques like redirecting responses? Finally, I can't tell from the Response javadoc whether I can just call commit() after setting my redirect headers, or whether I need to call getOutputStream().close() to send the response along with an empty response body. Perhaps you could clarify this. Thanks, David Flanagan |