• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOApp hangs, is it the cookie?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOApp hangs, is it the cookie?


  • Subject: Re: WOApp hangs, is it the cookie?
  • From: Baiss Eric Magnusson <email@hidden>
  • Date: Fri, 19 Mar 2004 13:33:25 -0800

I've added NSlogging code to my app to see where it might be hanging but I can't figure out how to make a new woa w/o taking down the main site. I've altered the cookie code to "hopefully" avoid some problems there.

I posted a question on WOAdmin-Omni about that, basically it says:
*****
I have several WO apps deployed and I would like to build them as <WOtest> and test them under real deployment, so I would have a <WOtest> started by JavaMonitor and get to it via:
<http://xxx.xxx.xxx.xxx/cgi-bin/WebObjects/WOtest.woa>
I would have thought that just changing the <Product name> field in the <Edit Active Target> pane would do the trick, but it doesn't.
*****



On Mar 19, 2004, at 9:09 AM, Chuck Hill wrote:

There is a bug in cookie handling up to 5.2.2. This is supposed to be fixed in 5.2.3 but I'm not brave enough to check it out. :-)

If the app receives an invalid cookie string (I think the problem is where the last cookie has no value) then Bad Things TM happen. In the cookie below if curRegionName was null then an invalid cookie would be set. I don't have the code at hand but if you search wocode, wodev or the archives I'm pretty sure you find it.

You can test this out by deleting all the cookies on the client machine and seeing if you can access the application.

For testing and debugging things like cookies, a http proxy that logs the conversation can be invaluable. WebScarab from OWASP is free and works reasonably well - give or take a few quirks.

Chuck


On Mar 19, 2004, at 8:02 AM, Baiss Eric Magnusson wrote:

I posted a question about what was the meaning behind a WO app that gave a http/servlet response of 200,0 into the Server logs and left the browser page blank.

I am investigating the possibility that the app just hung.

I am introducing WOCookies into the app, it seems to me that in development mode there is no way to check if the cookies are doing anything, i.e. when I run the app in development mode everything works ok but I don't have any measurement of the success or failure of the cookie logic. So I had hoped that the cookies would work when the app was deployed.

At any rate, in my constructor code in Main I have:

NSArray allCookies = context.request().cookies();
curRegionName = context.request().cookieValueForKey( "region" );

if ( curRegionName == null ) {
curRegionName = "Iceland";
cookie = new WOCookie( "region", curRegionName, "/", ".nwSufis.org", -1, false );
cookie.setExpires(null);
newCookie = true;
} else {
cookie = (WOCookie)allCookies.objectAtIndex(0);
}


Is this not the way to get to cookies if present and to create the 1st one otherwise?


----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>
_______________________________________________
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.




----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>
_______________________________________________
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.


References: 
 >WOApp hangs, is it the cookie? (From: Baiss Eric Magnusson <email@hidden>)
 >Re: WOApp hangs, is it the cookie? (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: No instance available question...
  • Next by Date: logout again..
  • Previous by thread: Re: WOApp hangs, is it the cookie?
  • Next by thread: Split installation in xcode
  • Index(es):
    • Date
    • Thread