Hi Sem, it looks like RequestSecurityManagerImpl is trying to redirect the
async request. Obviously redirecting an async request doesn't make sense,
hence the UnsupportedOperationException.

I can only guess that you have the @Secure annotation on the page. Correct?

Ultimately, we want Request.isSecure() to return true so it doesn't attempt
the redirect. I can see two ways of doing this:

1. Override / decorate PerRequestBroadcastFilter. You could extend
PerRequestBroadcastFilterImpl and override
createOfflineRequestContext(AtmosphereResource resource) to call
DefaultOfflineRequestContext.setSecure(true). Luckily this method is
protected so is a couple of lines of code.

2. Override / decorate OfflineObjectFactory such that Request.isSecure()
returns true.

https://github.com/uklance/tapestry-atmosphere/blob/master/tapestry-atmosphere/src/main/java/org/lazan/t5/atmosphere/services/internal/PerRequestBroadcastFilterImpl.java

https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/internal/OfflineObjectFactoryImpl.java

Cheers,
Lance.

Reply via email to