Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
- Subject: Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
- From: Chuck Hill <email@hidden>
- Date: Wed, 30 Mar 2005 12:17:56 -0800
On Mar 30, 2005, at 12:11 PM, Kaj Hejer wrote:
Thank you for asnwering!!
On 30. mar 2005, at 21.46, Chuck Hill wrote:
Why is handleSessionRestorationErrorInContext called here?
What I _think_ is happening:
Sounds resonable (as you always do ;-)
Tell that to my wife! :-P
When writing context.request() to the log in
handleSessionRestorationErrorInContext I see that the request is for
the following url: "/cgi-bin/WebObjects/nettlogg.woa/wo/myimage.gif"
I'd try to trap things like that before they get to the session
handling code. One place is in rewrite rules if using Apache.
Another
Application.dispatchRequest before calling super. Just return a 404
response.
Application.dispatchRequest sounds like a good place.
But how should I know when to return a 404 response? I could look for
"nettlogg.woa/wo/*.gif" in the request url and then I know I should
return status 404. Does that sound like a resonable way of knowing
when to return status 404?
That is roughly what I was thinking. You could probably just reject
any URL ending in .gif, .jpg, .jpeg etc. etc. Another way to do this
is to compare to a correctly formed URL: nettlogg.woa/wo/<context
ID>.<element ID>.
Context ID should be one or more digits, element ID is more variable.
It should be easy to look for <digits>. after any /wo/ in a URL with
regex.
Chuck
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
I have one! ;-)
:-)
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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