Branch: refs/heads/master
Home:
https://github.com/gatein/gatein-wsrp
Commit: 0c6ed6aa10303dee14f6bdfa661e9fbf54625919
https://github.com/gatein/gatein-wsrp/commit/0c6ed6aa10303dee14f6bdfa661e...
Author: Chris Laprun <metacosm(a)gmail.com>
Date: 2013-01-30 (Wed, 30 Jan 2013)
Changed paths:
M
consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java
M
consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ProducerSessionInformation.java
M consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java
M consumer/src/main/java/org/gatein/wsrp/handler/CookieUtil.java
M consumer/src/main/java/org/gatein/wsrp/handler/RequestHeaderClientHandler.java
R
consumer/src/test/java/org/gatein/wsrp/consumer/ProducerSessionInformationTestCase.java
A
consumer/src/test/java/org/gatein/wsrp/consumer/handlers/ProducerSessionInformationTestCase.java
M
consumer/src/test/java/org/gatein/wsrp/handler/RequestHeaderClientHandlerTestCase.java
M consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
M consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
A consumer/src/test/java/org/gatein/wsrp/test/support/CookieSupport.java
M test/src/main/java/org/gatein/wsrp/test/handler/MockSOAPMessageContext.java
Log Message:
-----------
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.