[jira] [Closed] (FELIX-5053) IllegalArgumentException when forwarding request

2015-10-12 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/FELIX-5053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler closed FELIX-5053.
---

> IllegalArgumentException when forwarding request
> 
>
> Key: FELIX-5053
> URL: https://issues.apache.org/jira/browse/FELIX-5053
> Project: Felix
>  Issue Type: Bug
>  Components: HTTP Service
>Affects Versions: http.base-3.0.0
>Reporter: Sten Roger Sandvik
>Assignee: Sten Roger Sandvik
> Fix For: http.base-3.0.2, http.jetty-3.1.2, http.bridge-3.0.2
>
>
> It seems to be a problem with forwarding requests in certain cases. I have 
> the following setup:
> * Servlet A forwards the request to Servlet 2 (using RequestDispatcher).
> * Servlet B writes to the response using an output stream 
> (HttpServletResponse.getOutputStream()).
> When this happens I get an IllegalStateException from Jetty that basically 
> saying that the Writer cannot be closed since I have already used an 
> OutputStream.
> The code that I think is wrong (or possibly not robust enough) is in 
> RequestDispatcherImp line 84. 
> {code}
> if (!request.isAsyncStarted())
> {
>   response.flushBuffer();
>   response.getWriter().close();
> }
> {code}
> The line that causes trouble is:
> {code}
> response.getWriter().close();
> {code}
> We should probably check if we can actually close this writer or just ignore 
> the potential exception.
> In my setup I have one servlet that writes to OutputStream using 
> HttpServletResponse.getOutputStream(). Then I have another servlet that 
> forwards the request to the first servlet. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (FELIX-5053) IllegalArgumentException when forwarding request

2015-10-01 Thread Sten Roger Sandvik (JIRA)

 [ 
https://issues.apache.org/jira/browse/FELIX-5053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sten Roger Sandvik closed FELIX-5053.
-
   Resolution: Fixed
Fix Version/s: http.base-3.0.2

> IllegalArgumentException when forwarding request
> 
>
> Key: FELIX-5053
> URL: https://issues.apache.org/jira/browse/FELIX-5053
> Project: Felix
>  Issue Type: Bug
>  Components: HTTP Service
>Affects Versions: http.base-3.0.0
>Reporter: Sten Roger Sandvik
>Assignee: Sten Roger Sandvik
> Fix For: http.base-3.0.2
>
>
> It seems to be a problem with forwarding requests in certain cases. I have 
> the following setup:
> * Servlet A forwards the request to Servlet 2 (using RequestDispatcher).
> * Servlet B writes to the response using an output stream 
> (HttpServletResponse.getOutputStream()).
> When this happens I get an IllegalStateException from Jetty that basically 
> saying that the Writer cannot be closed since I have already used an 
> OutputStream.
> The code that I think is wrong (or possibly not robust enough) is in 
> RequestDispatcherImp line 84. 
> {code}
> if (!request.isAsyncStarted())
> {
>   response.flushBuffer();
>   response.getWriter().close();
> }
> {code}
> The line that causes trouble is:
> {code}
> response.getWriter().close();
> {code}
> We should probably check if we can actually close this writer or just ignore 
> the potential exception.
> In my setup I have one servlet that writes to OutputStream using 
> HttpServletResponse.getOutputStream(). Then I have another servlet that 
> forwards the request to the first servlet. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)