-
Bug
-
Resolution: Fixed
-
P2
-
6u5, 6u23
-
b114
-
generic
-
generic, linux_redhat_5.2
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2208807 | 6u27 | Dmeetry Degrave | P3 | Closed | Fixed | b01 |
JDK-2208658 | 6u26-rev | Dmeetry Degrave | P3 | Resolved | Fixed | b21 |
JDK-2208638 | 6u25-rev | Dmeetry Degrave | P3 | Resolved | Fixed | b21 |
JDK-2206097 | 6u24-rev | Dmeetry Degrave | P3 | Closed | Fixed | b24 |
If a HttpURLConnection is using either fixed content length or chunked transfer to POST request body and for some reason the OutputStream throws an IOException while writing the output data, a subsequent call to getResponseCode or getInputStream will resend the POST request headers initiating a new connection to the server. This is clearly not correct as no request body can be sent with the POST through the getResponseCode/getInputStream API.
The following bug seems to be related to this one.
Attaching a test case, a web serivce calls itself via its own proxy recursively.
- HttpURLConnection sends a request and waits for ever in getResponseCode(). But the request doesn't reach GFv2UR2(same goes with tomcat)
- The test case works well when keep-alive is disabled
Running the test case:
- Make sure that GF uses 8080 port(which is its default)
- increase http request threads to 25 in $GF/domains/domain1/config/domain.xml
<request-processing header-buffer-length-in-bytes="8192" initial-thread-count="2" request-timeout-in-seconds="30" thread-count="25" thread-increment="1"/>
- cp BreakMeAgain.jar $GF/domains/domain1/autodeploy/
- $GF/bin/asadmin start-domain
- Use browser to start the test: http://localhost:8080/BreakmeService/BreakMeService?tester
use 10 as input. GF server.log only prints 10,9 and see that a thread is hanging in HttpURLConnection.getResponseCode(). If the keep-alive is disabled, it prints 10,9,8,7, ...
Jean Francois, can you provide more details of the analysis.
The following bug seems to be related to this one.
Attaching a test case, a web serivce calls itself via its own proxy recursively.
- HttpURLConnection sends a request and waits for ever in getResponseCode(). But the request doesn't reach GFv2UR2(same goes with tomcat)
- The test case works well when keep-alive is disabled
Running the test case:
- Make sure that GF uses 8080 port(which is its default)
- increase http request threads to 25 in $GF/domains/domain1/config/domain.xml
<request-processing header-buffer-length-in-bytes="8192" initial-thread-count="2" request-timeout-in-seconds="30" thread-count="25" thread-increment="1"/>
- cp BreakMeAgain.jar $GF/domains/domain1/autodeploy/
- $GF/bin/asadmin start-domain
- Use browser to start the test: http://localhost:8080/BreakmeService/BreakMeService?tester
use 10 as input. GF server.log only prints 10,9 and see that a thread is hanging in HttpURLConnection.getResponseCode(). If the keep-alive is disabled, it prints 10,9,8,7, ...
Jean Francois, can you provide more details of the analysis.
- backported by
-
JDK-2208638 HttpURLConnection.getInputStream sends POST request after failed chunked send
- Resolved
-
JDK-2208658 HttpURLConnection.getInputStream sends POST request after failed chunked send
- Resolved
-
JDK-2206097 HttpURLConnection.getInputStream sends POST request after failed chunked send
- Closed
-
JDK-2208807 HttpURLConnection.getInputStream sends POST request after failed chunked send
- Closed
- duplicates
-
JDK-7007889 HttpURLConnection does not send chunked Body to Web Server when reconnection is occurred
- Closed