RFR : 8007315 HttpURLConnection.filterHeaderField method returns null where empty string is expected
Chris Hegarty
chris.hegarty at oracle.com
Tue Feb 19 05:08:02 PST 2013
As the author of the offending code, I agree with your proposed change. Thanks for updating the test.
-Chris
On 19 Feb 2013, at 12:54, Seán Coffey <sean.coffey at oracle.com> wrote:
> 8007315 deals with an issue in SAAJ code where a NullPointerException is seen.
>
> The SAAJ code makes the assumption that non-null keys obtained from a httpURLConnection header will contain non-null values :
>
> 294 key = httpConnection.getHeaderFieldKey(i);
> 295 value = httpConnection.getHeaderField(i); --> assumed to be non-null
>
> A behavioural change came into jdk7u4 with the 7095980 fix. With the filtering of httpOnly cookies, when cookieHandler is set, the code returns null if no other values are present in the values returned for a header key. I'm proposing to change that to be an empty string instead ("").
>
> I've added extra scenarios to the original 7095980 unit testcase also to cover this scenario.
>
> bug : http://bugs.sun.com/view_bug.do?bug_id=8007315
> webrev : http://cr.openjdk.java.net/~coffeys/webrev.8007315.jdk8/
>
> regards,
> Sean.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20130219/5b9861fa/attachment.html
More information about the net-dev
mailing list