Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Resolution: Wont Fix
Submitted By: Aaron Hamid (aaron)
Assigned to: Greg Wilkins (gregwilkins)
Summary: ProxyHandler header propagation bug
ProxyHandler has a bug when writing headers back to the
client. It uses code like:
However, at least in JDK 1.5 getHeaderField(h) returns
null for the 0th field. Since a null header field key
is used as a loop termination condition, I suspect the
headers are not being written back to the client.
The loop should either use a different condition for
the loop (e.g., connection.getHeaderFields().size()) or
use the connection.getHeaderFields() map instead.
(Using the map may lose the field order, depending on
what type of map is used internally by the
URLConnection implementation (e.g. LinkedHashMap would
preserve order), but that is the first thing I
implemented. Probably using
connection.getHeaderFields().size() in combination with
getHeaderFieldKey/getHeaderField is better.)