WebObjects 5.3.1 Redirect bug?
WebObjects 5.3.1 Redirect bug?
- Subject: WebObjects 5.3.1 Redirect bug?
- From: David LeBer <email@hidden>
- Date: Tue, 15 Nov 2005 15:03:06 -0500
I'm playing with WebObjects 5.3.1 and I'm seeing an oddity in
WORedirect:
With redirect code like this:
	public WOComponent createDA()
	{
		NSMutableDictionary dict = new NSMutableDictionary();
		dict.takeValueForKey("Zero", "valueZero");
		dict.takeValueForKey(String.valueOf(1), "valueOne");
		dict.takeValueForKey("Two", "valueTwo");
        	System.out.println("Performing: " + dict);
		String url = context().directActionURLForActionNamed( "default",
dict );
		WORedirect redirect = new WORedirect(context());
        	System.out.println("Performing (URL): " + url);
		redirect.setUrl(url);
		return redirect;
	}
And default action code like this:
    public WOActionResults defaultAction() {
		System.out.println("Action: " + request().formValues());
        	return pageWithName("Main");
    }
I get these results:
Performing: {valueZero = "Zero"; valueTwo = "Two"; valueOne = "1"; }
Performing (URL): /cgi-bin/WebObjects/NewWOTest.woa/wa/default?
valueZero=Zero&valueTwo=Two&valueOne=1
Action: {valueZero = ("Zero"); amp;valueTwo = ("Two"); amp;valueOne =
("1"); }
WO is encoding the ampersands in the url into & but then it is
not respecting the encoding when it extracts the values again
(leaving the munged dictionary keys). I'm hoping there is something
stupid I am doing here and this is not a bug. If anyone can confirm
or negate my results I'd be grateful.
--
;david
--
David LeBer
"I am codeferous!"
Codeferous Software
site:   http://www.codeferous.com
blog: http://david.codeferous.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
 _______________________________________________
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