[Moving over to the users list]
On Jun 6, 2009, at 11:19 AM, Matt Savage wrote:
> My bad- typo searching for ClassCastException in the archives.
>
> Resolved in Issue 204 I believe.
>
Correct!
Paul.
>
> 2009/6/6 Matt Savage <matthew.savage_at_gmail.com>
> If a resource throws a ClassCastException, users get the confusing
> exception "non-HTTP request or response".
>
> In ServletContainer:
>
> public void service(ServletRequest request, ServletResponse
> response) throws ServletException, IOException {
> try {
> service((HttpServletRequest) request,
> (HttpServletResponse) response);
> } catch (ClassCastException e) {
> throw new ServletException("non-HTTP request or
> response");
> }
> }
>
> Needs to change to something like:
>
> public void service(ServletRequest request, ServletResponse
> response) throws ServletException, IOException {
> HttpServletRequest httpRequest;
> HttpServletResponse httpResponse;
> try {
> httpRequest = (HttpServletRequest) request;
> httpResponse = (HttpServletResponse) response;
> } catch (ClassCastException e) {
> throw new ServletException("non-HTTP request or
> response");
> }
> service(httpRequest httpResponse);
> }
>
>