Re: WO creates additional sessions under Safari
Re: WO creates additional sessions under Safari
- Subject: Re: WO creates additional sessions under Safari
- From: Art Isbell <email@hidden>
- Date: Mon, 13 Jan 2003 10:42:16 -1000
On Thursday, January 9, 2003, at 06:34 PM, Art Isbell wrote:
Testing my WO apps under Safari has been driving me crazy because of
their unexpected behavior. I think I at least know what is happening,
but not why.
The cause of this additional session creation isn't due to a bug in
Safari or WO. A WO enhancement request has been filed with Apple so
that all WO developers who use certain browsers don't have to implement
a workaround.
When a WO app that uses component actions is launched in debug mode
from PB, the normal new session is created. However, after each
response page is loaded by Safari, another session is created.
This problem occurs only when running WO in Direct Connect mode, not
when deployed using a Web browser. It happens as a result of the
favicon request that Safari, Chimera, and probably other browsers make.
The favicon request is an additional request made to fetch the
favicon, if any, from the Web server document root. This request
doesn't contain a URL for which a WO session exists, so WO creates one.
The Web server handles this request, so the WO process never sees the
request, but in Direct Connect mode, no Web server is involved, so the
WO process handles the request.
A workaround to prevent this additional session creation during
development might be something like the following, an override of
WOApplication's dispatchRequest. I haven't thoroughly tested this
workaround, so use it at your own risk.
public WOResponse dispatchRequest(WORequest aRequest) {
// In Direct Connect mode, each favicon request will generate a
new session.
// This should workaround this problem.
if (isDirectConnectEnabled() && (aRequest != null) &&
aRequest.uri().equals("/favicon.ico")) {
return new WOResponse();
}
else {
return super.dispatchRequest(aRequest);
}
}
Art
http://homepage.mac.com/aisbell/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.