|
Quick Lists
|
|
Bug ID:
|
6660405
|
|
Votes
|
0
|
|
Synopsis
|
HttpURLConnection returns the wrong InputStream
|
|
Category
|
java:classes_net
|
|
Reported Against
|
|
|
Release Fixed
|
7(b25)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
2-High
|
|
Related Bugs
|
|
|
Submit Date
|
07-FEB-2008
|
|
Description
|
When a CacheHandler is provided and the URL is found in the cache after a redirect, HttpURLConnection will return the wrong InputStream, i.e. the one from the redirect instead of the one from the Cache. Which will trigger an IOException since the InputStream from the redirect has been closed.
This is triggered on the second call to URLConnection.getInputStream().
One other way this happens is when checking headers first, like getResponseCode() then calling getInputStream().
Posted Date : 2008-03-05 14:19:38.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
This is due to keeping 2 separate InputStreams (one for networked connection, one for cached connection).
One of them should be always be null, however after a redirect, the networked one is not set back to null, hence the conflict.
Will fix as soon as possible.
Posted Date : 2008-03-05 14:19:38.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |