How to get Secure & non-HttpOnly cookies from CookieHandler

Vasiliy Baranov vasiliy.baranov at oracle.com
Fri Jun 14 01:48:25 PDT 2013


Greetings,

Suppose I need to call java.net.CookieHandler.get(URI uri, 
Map<String,List<String>> requestHeaders) and need to filter out 
'HttpOnly' cookies from the result. My understanding is in that case I 
should call CookieHandler.get with a URI starting with "javascript://" 
or any other non-HTTP scheme.

Now what if I need to exclude 'HttpOnly' cookies but include 'Secure' 
non-'HttpOnly' cookies? Which scheme should I use in the URI in that 
case? "javascripts"?

This question is somewhat related to 
http://bugs.sun.com/view_bug.do?bug_id=7077220 , 
http://bugs.sun.com/view_bug.do?bug_id=7038890 , and 
http://bugs.sun.com/view_bug.do?bug_id=7048628 .

Thank you,
-- Vasiliy



More information about the net-dev mailing list