[Seaside] Re: expire path for application
Esteban Lorenzano
estebanlm at gmail.com
Sun May 9 21:18:19 UTC 2010
Hi,
I "some kind" solved this problem by adding:
WAApplication>>#expiryPathFor: aRequest
^(self preferenceAt: #serverPath)
ifNotNilDo: [ :path |
String streamContents: [ :stream |
stream
nextPutAll: path;
nextPut: $/;
nextPutAll: (self expiryPathWithoutBaseFor: aRequest) ] ]
ifNil: [ super expiryPathFor: aRequest ].
WAApplication>>#expiryPathWithoutBaseFor: aRequest
| pathCollection |
pathCollection := (super expiryPathFor: aRequest)
asCollectionWithDelimiter: $/.
"3 is the start of a single path (url is /seaside/[a name]/extra)"
^String streamContents: [ :stream |
(pathCollection copyFrom: 3 to: pathCollection size)
do: [ :each | stream nextPutAll: each ]
separatedBy: [ stream nextPut: $/ ] ].
It is not very elegant, but it is working fine on ibizlog.com
I hope it is useful for you.
Cheers,
Esteban
On 2010-05-09 17:28:07 -0300, Julian Fitzell <julian at fitzell.ca> said:
>
>
> No, I have no idea. I've just run into that problem as a user of the site.
> Probably someone who can tell us is reading this list, though?
>
> Julian
>
> On Sun, May 9, 2010 at 5:37 PM, Norbert Hartl <norbert at hartl.name> wrote:
>
>> Julian,
>>
>> can you tell us the configuration of the ESUG server? I mean the setting
>> for server path, hostname and such. Then I can have an eye on this issue,
>> too.
>>
>> Norbert
>>
>> On 09.05.2010, at 16:21, Julian Fitzell wrote:
>>
>> This sounds very familiar... I assume you've tried searching the archives?
>> Unfortunately I don't actually recall the resolution off the top of my head.
>> I wonder if this is related to the issue on the ESUG website, but it seems
>> to revert to localhost:8080 when the session expires so it's even worse (but
>> maybe a sign that the problem is bigger?).
>>
>> Julian
>>
>> On Sun, May 9, 2010 at 11:30 AM, Norbert Hartl <norbert at hartl.name> wrote:
>>
>>> I'm about to chase down an annyoing artifact. I have quite a usual
>>> deployment where the server path in the application configuration ist set to
>>> / and seaside is deployed behind an apache. Well, I'm using seaside 2.8 if
>>> this is important to know.
>>>
>>> The problem is that whenever a session expires the redirect url contains
>>> the base path of the application. I mean the application is registered at
>>>
>>> /seaside/myapp
>>>
>>> When the redirect occurs I get the url
>>>
>>> http://myhost/seaside/myapp/additional/path
>>>
>>> instead of
>>>
>>> http://myhost/additional/path
>>>
>>> I think I found the cause. In
>>>
>>> WAApplication>>handleExpiredRequest:
>>>
>>> there is
>>>
>>> url := self baseUrl path: OrderedCollection new.
>>> url addToPath: (self expiryPathFor: aRequest).
>>>
>>> baseUrl calls basePath and that checks the existance of a set serverPath.
>>> The second call to expiryPath does not. So I get a path / from the call to
>>> baseUrl but then the /seaside/myapp is copied onto while addToPath: with the
>>> full path is executed. I think a
>>>
>>> WARegistry>>expiryPathFor: aRequest
>>> self serverPath isNil ifFalse: [
>>> ^ aRequest url copyFrom: (self basePath size + 1) to:
>>> aRequest url size].
>>> ^ aRequest url
>>>
>>> will help.
>>>
>>> On the other hand it could be that I'm doing something wrong. If not a lot
>>> of people should discovered this already :) I'm trying to find the right
>>> place where to fix the issue. Thanks for any hints
>>>
>>> Norbert_______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>
>
> No, I have no idea. I've just run into that problem as a user of the si=
> te. Probably someone who can tell us is reading this list, though?<br><br>J=
> ulian<br><br><div class=3D"gmail_quote">On Sun, May 9, 2010 at 5:37 PM, Nor=
> bert Hartl <span dir=3D"ltr"><<a href=3D"mailto:norbert at hartl.name">norb=
> ert at hartl.name</a>></span> wrote:<br>
>
> <blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
> r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style=3D"wor=
> d-wrap: break-word;">Julian,<div><br></div><div>can you tell us the configu=
> ration of the ESUG server? I mean the setting for server path, hostname and=
> such. Then I can have an eye on this issue, too.=A0</div>
>
> <div><br></div><font color=3D"#888888"><div>Norbert</div></font><div><div><=
> /div><div class=3D"h5"><div><br><div><div>On 09.05.2010, at 16:21, Julian F=
> itzell wrote:</div><br><blockquote type=3D"cite">This sounds very familiar.=
> .. I assume you've tried searching the archives? Unfortunately I don=
> 9;t actually recall the resolution off the top of my head. I wonder if this=
> is related to the issue on the ESUG website, but it seems to revert to loc=
> alhost:8080 when the session expires so it's even worse (but maybe a si=
> gn that the problem is bigger?).<br>
>
>
>
> <br>Julian<br><br><div class=3D"gmail_quote">On Sun, May 9, 2010 at 11:30 A=
> M, Norbert Hartl <span dir=3D"ltr"><<a href=3D"mailto:norbert at hartl.name=
> " target=3D"_blank">norbert at hartl.name</a>></span> wrote:<br><blockquote=
> class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px=
> solid rgb(204, 204, 204); padding-left: 1ex;">
>
>
>
> I'm about to chase down an annyoing artifact. I have quite a usual depl=
> oyment where the server path in the application configuration ist set to / =
> and seaside is deployed behind an apache. Well, I'm using seaside 2.8 i=
> f this is important to know.<br>
>
>
>
>
> <br>
> The problem is that whenever a session expires the redirect url contains th=
> e base path of the application. I mean the application is registered at<br>
> <br>
> /seaside/myapp<br>
> <br>
> When the redirect occurs I get the url<br>
> <br>
> <a href=3D"http://myhost/seaside/myapp/additional/path" target=3D"_blank">h=
> ttp://myhost/seaside/myapp/additional/path</a><br>
> <br>
> instead of<br>
> <br>
> <a href=3D"http://myhost/additional/path" target=3D"_blank">http://myhost/a=
> dditional/path</a><br>
> <br>
> I think I found the cause. In<br>
> <br>
> WAApplication>>handleExpiredRequest:<br>
> <br>
> there is<br>
> <br>
> url :=3D self baseUrl path: OrderedCollection new.<br>
> url addToPath: (self expiryPathFor: aRequest).<br>
> <br>
> baseUrl calls basePath and that checks the existance of a set serverPath. T=
> he second call to expiryPath does not. So I get a path / from the call to b=
> aseUrl but then the /seaside/myapp is copied onto while addToPath: with the=
> full path is executed. I think a<br>
>
>
>
>
> <br>
> WARegistry>>expiryPathFor: aRequest<br>
> =A0 =A0 =A0 =A0self serverPath isNil ifFalse: [<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^ aRequest url copyFrom: (self basePath siz=
> e + 1) to: aRequest url size].<br>
> =A0 =A0 =A0 =A0^ aRequest url<br>
> <br>
> will help.<br>
> <br>
> On the other hand it could be that I'm doing something wrong. If not a =
> lot of people should discovered this already :) I'm trying to find the =
> right place where to fix the issue. Thanks for any hints<br>
> <br>
> Norbert_______________________________________________<br>
> seaside mailing list<br>
> <a href=3D"mailto:seaside at lists.squeakfoundation.org" target=3D"_blank">sea=
> side at lists.squeakfoundation.org</a><br>
> <a href=3D"http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seasi=
> de" target=3D"_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/lis=
> tinfo/seaside</a><br>
> </blockquote></div><br>
> _______________________________________________<br>seaside mailing list<br>=
> <a href=3D"mailto:seaside at lists.squeakfoundation.org" target=3D"_blank">sea=
> side at lists.squeakfoundation.org</a><br><a href=3D"http://lists.squeakfounda=
> tion.org/cgi-bin/mailman/listinfo/seaside" target=3D"_blank">http://lists.s=
> queakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>
> </blockquote></div><br></div></div></div></div><br>________________________=
> _______________________<br>
> seaside mailing list<br>
> <a href=3D"mailto:seaside at lists.squeakfoundation.org">seaside at lists.squeakf=
> oundation.org</a><br>
> <a href=3D"http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seasi=
> de" target=3D"_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/lis=
> tinfo/seaside</a><br>
> <br></blockquote></div><br>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list