Hi,
Selecting a different look using Pier's PRDesignChooserWidget causes
an WAUnregisteredHandlerError exception to be raised. This occurs on the
latest builds:
http://hudson.lukas-renggli.ch/job/Pier%202/lastBuild/
The PRDesignChooserWidget registers 'pier' with the new structure in place
then sends an #expiredKey response as:
self requestContext responseGenerator
expiredKey;
respond
The problem appears to be in a change to WAResponseGenerator>>expiredKey,
which was introduced:
---
Name: Seaside-Core-YM.639
Author: YM
Time: 22 May 2010, 7:39:33 pm
UUID: e24bae83-3671-4679-ac8d-9f21154c304e
Ancestors: Seaside-Core-pmm.638
http://code.google.com/p/seaside/issues/detail?id=552
- Corrected WAResponseGenerator>>#expiredKey to always use the correct URL
- Implemented WAPathConsumer>>#upToEnd
----
The exception is thrown in the line:
url := self requestContext handler url.
#handler returns a WASession which I presume wasn't expected when the code
was written.
Changing the code to:
url := self requestContext request url
stops the exception from being thrown, but doesn't result in a URL free from
keys; not the desired effect. I found a handy Pier extension method
WAUrl>>purgeSeasideFields.The rewritten WAResponseGenerator>>expiredKey then
becomes:
expiredKey
"The session key has expired, redirect the request to the home directory
preserving the path as well as possible."
| url |
self request isXmlHttpRequest
ifTrue: [ ^ self forbidden ].
url := self requestContext request url.
url addAllToPath: self requestContext consumer upToEnd.
self request isGet ifTrue: [
url purgeSeasideFields].
self response redirectTo: url
With the requirement that the WAUrl>>purgeSeasideFields is moved from
Pier-Seaside-Mapping into Seaside-Core-HTTP.
Thoughts?
Nick