gatein/gatein-wsrp — pull request #66 by metacosm (2013-01-30 11:37:16+00:00)
Title: GTNWSRP-347 Improved cookie handling

Moved ProducerSessionInformationTestCase to more appropriate package. Made methods that were public for tests package local.
Moved cookie-handling method to CookieUtil.
Switched to using Lists instead of arrays for cookies. Avoid erasing other potentially existing cookies.
Removed unneeded call to resetCurrentlyHeldInformation.
Added debugging information.
Added CookieSupport class.
Simplified and rationalized externalized cookie creation methods.
- CookieUtil: reworked coalesceCookies method and re-implement outputToExternalForm as coalesceAndExternalizeCookies method.
- RequestHeaderClientHandler: Simplified and renamed createCookie(ProducerSessionInformation) to createCoalescedCookieFromCurrentInfo method. Use CookieUtil.coalesceCookies instead of re-implementing it incorrectly. Cleaned-up handleRequest method. Added test cases.
- DirectResourceServingHandler: Simplified cookie handling.
Make getUserCookie and getGroupCookieFor return a cookie list instead of coalescing into a String. Rename as plural form for better coherence. Adapted test cases.
Add individual cookies to headers and leave potential coalescing to WS stack.
Fix NPE issue.