avi.bryant at gmail.com
Wed Oct 26 23:13:47 UTC 2005
On Oct 26, 2005, at 3:47 PM, Avi Bryant wrote:
> This should work:
> WADispatcher default basePath: '/'
Though, of course, that exhibits the problem Ramon pointed out. So I
think the better solution is to use this patch:
handlerForRequest: aRequest relativeTo: base
| path name |
path := aRequest url.
(base isEmpty or: [path beginsWith: base])
ifTrue: [| relativePath |
relativePath := path allButFirst: base size.
and: [relativePath first = $/])
ifTrue: [name := (relativePath
ifPresent: [:n | ^ n]].
^ WANotFoundHandler new
WADispatcher default basePath: ''
The root problem here, I think, is that
'foo' beginsWith: ''
returns false, which is not the semantics I would expect.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Seaside