Re: DirectAction + Session restoration
Re: DirectAction + Session restoration
- Subject: Re: DirectAction + Session restoration
- From: Kieran Kelleher <email@hidden>
- Date: Wed, 31 Aug 2005 11:26:48 -0400
It seems wosid is being corrupted by the ?x,y coordinates at the end of
the URL.
Try using the 'name' attribute of WOActiveImage to see if it correctly
submited form values in the URL like
....?wosid=......&name.x=8&name.y=10
In any case the behaviour you see should probably be reported as a bug
since the ?8,10 at the end of the URL assumes you already have no query
string at the end of the URL.
On Aug 31, 2005, at 10:37 AM, Gavin Eadie wrote:
Ask, and you shall receive! I have elided some of the "user-agent"
text and manually folded the "referer" URL to try and avoid nasty text
folding by people's e-mail clients
SessionID before this click is SAbdZ0JIxqQP1rviiigFsw
[[[ click hyperlink -- behaves correctly -- existingSession() returns
session ]]]
request: <com.webobjects.appserver.WORequest (
<com.webobjects.appserver.WORequest
httpVersion=HTTP/1.1
headers={user-agent = (Mozilla/5.0 (...) AppleWebKit/412.7
(...) Safari/412.5);
accept = (*/*);
referer =
(http://dynamic234-208.staff.itd.umich.edu:55555/ \
cgi-bin/WebObjects/DASessionTest.woa);
accept-encoding = (gzip, deflate);
host = (dynamic234-208.staff.itd.umich.edu:55555);
accept-language = (en); connection = (keep-alive); }
content-length=0 cookies=null userInfo=null>)
method=GET
uri=/cgi-bin/WebObjects/DASessionTest.woa/wa/test?
wosid=SAbdZ0JIxqQP1rviiigFsw
defaultFormValueEncoding=ISO8859_1
formValueEncodingDetectionEnabled=NO
formValueEncoding=ISO8859_1
formValues={wosid = ("SAbdZ0JIxqQP1rviiigFsw"); } >
[[[ click activeimage -- behaves incorrectly -- existingSession()
returns NULL ]]]
request: <com.webobjects.appserver.WORequest (
<com.webobjects.appserver.WORequest
httpVersion=HTTP/1.1
headers={user-agent = (Mozilla/5.0 (...) AppleWebKit/412.7
(...) Safari/412.5);
accept = (*/*);
referer =
(http://dynamic234-208.staff.itd.umich.edu:55555/ \
cgi-bin/WebObjects/DASessionTest.woa/ \
wa/test?wosid=SAbdZ0JIxqQP1rviiigFsw);
accept-encoding = (gzip, deflate);
host = (dynamic234-208.staff.itd.umich.edu:55555);
accept-language = (en); connection = (keep-alive); }
content-length=0 cookies=null userInfo=null>)
method=GET
uri=/cgi-bin/WebObjects/DASessionTest.woa/wa/test?
wosid=SAbdZ0JIxqQP1rviiigFsw?8,10
defaultFormValueEncoding=ISO8859_1
formValueEncodingDetectionEnabled=NO
formValueEncoding=ISO8859_1
formValues={wosid = ("SAbdZ0JIxqQP1rviiigFsw?8,10"); } >
At 9:22 AM -0400 8/31/05, Kieran Kelleher wrote:
Something must be different in the requests generated ...... it might
be worthwhile to log the request().toString() and compare to see if
that sheds light on the problem.
On Aug 31, 2005, at 1:02 AM, LD wrote:
Hi there,
On 31/08/2005, at 1:06 PM, Gavin Eadie wrote:
It's not quite the same as a recent thread related to DirectActions
and Sessions, but in researching a behavior I didn't understand, I
seem to have hit on an anomaly. OR, I've hit on my ignorance, again.
This arose when a colleague and I were each using the same logout
action from a framework -- mine worked, his didn't; mine was triggered
by a text hyperlink, his by an image.
Demonstration:
Make a new application from the basic WebObjects application
template. On the Main page put a WOHyperink and a WOActiveImage ...
bind them both to the same DirectAction method, say "test" for
example. In the testAction method log the values of expiredSession()
and session(), in that order:
public WOActionResults testAction() {
NSLog.out.appendln(existingSession());
NSLog.out.appendln(session());
return pageWithName("Main");
}
Fire up the application and click on the hyperlink:
expiredSession() returns the session [and so does session(),
obviously]
Click on the active image:
expiredSession() returns null, and session() makes a fresh session
Intriguing... looks like a bug, acts like a bug... well, I can't
fathom why this would occur seeing as both href's are absolutely
identical.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden