Status: Accepted
Owner:
[hidden email]
Labels: Type-Defect Priority-Medium GLASS-Server Version-1.0-beta.8
New issue 300 by
[hidden email]: Gemstone Swazoo adapter does not
respect Request URIs ending in slash.
http://code.google.com/p/glassdb/issues/detail?id=300Retrieving a Seaside WAUrl from a SwazooUri in
WAServerAdaptor>>requestUrlFor: does not account for the possibility that
the uri might end in a slash.
This turned out to be a problem in a recent SqueakSource version where this
lead to an infinite redirect. The FastCGI-version does not seem to have
this problem.
Solution: in WAServerAdaptor>>requestUrlFor:
a line "seasideUrl slash: swazooUri isDirectory." should be added.
See below.
WAServerAdaptor>>requestUrlFor: aNativeRequest
| swazooUri seasideUrl |
seasideUrl := WAUrl new.
swazooUri := aNativeRequest uri.
swazooUri identifierPath do: [ :each |
"the first path element seems to always be '/'"
each = '/' ifFalse: [
seasideUrl addToPath: each ] ].
seasideUrl slash: swazooUri isDirectory.
swazooUri queries do: [ :each |
| value |
value := each value.
"non-existing values are implemented as ''"
value isEmpty
ifTrue: [ seasideUrl addField: each key ]
ifFalse: [ seasideUrl addField: each key value: value ] ].
aNativeRequest isEncrypted
ifTrue: [ seasideUrl scheme: 'https' ].
^ seasideUrl decodedWith: self codec