DefaultGateway path to automatically pass session in URL from Flash
Will Prater <[email protected]>
| Newsgroups | gmane.comp.java.openamf.user |
|---|---|
| Message-ID | <[email protected]> |
List,
Here is a patch to automatically have Flash the session in the URL
when cookies are not available. Please test this on Revisions 1.65
and let me know if you have any troubles.
We are extending DefaultGateway and we did not use this conditional:
> if (!req.isRequestedSessionIdFromCookie()) {
Im not certain that will work so if someone has better knowlege of
Java's SESSION implementation they would be better suited to first
find if the client was able to accept cookies. If not then you would
add this header with each request.
Thanks
197a198,207
> String sessId = req.getSession().getId();
> if (!req.isRequestedSessionIdFromCookie()) {
> String newUrl = req.getRequestURL()
> + ";jsessionid=" + sessId;
> AMFHeader gatewayHeader = new AMFHeader(
> "ReplaceGatewayUrl",
> true,
> newUrl);
> responseMessage.addHeader(gatewayHeader);
> }
-WP3
DefaultGateway.patch
(application/octet-stream, 347 B)
197a198,207
> String sessId = req.getSession().getId();
> if (!req.isRequestedSessionIdFromCookie()) {
> String newUrl = req.getRequestURL()
> + ";jsessionid=" + sessId;
> AMFHeader gatewayHeader = new AMFHeader(
> "ReplaceGatewayUrl",
> true,
> newUrl);
> responseMessage.addHeader(gatewayHeader);
> }