--- David LeBer <[EMAIL PROTECTED]> wrote:

> 
> On 16-Nov-05, at 5:24 AM, Dev WO wrote:
> 
> <snip>
> 
> > I don't think the bug is in the hyperlink generation, because it  
> > was doing this in 5.2.2 and before (which isn't that old;)) and no 
> 
> > one mentioned a bug about this. And at least the &amp; in the  
> > source code of the (X)HTML is the correct way of doing it.
> 
> This is not the issue. Having encoded ampersands in the source html  
> is fine (and expected). It is having encoded ampersands in the  
> request that is causing the problem.
> 
> <snip>
> > I'm not as advance as any of you in WO, but I have some simple DA  
> > which lead to a product based on its PK like
> > productPK=15&amp;wosid=blabla
> > and it works just fine...
> > Maybe because there's not that much parameter and I'm requesting  
> > the value of the first one.
> > The wosid is working well too, so it must be getting correctly
> too...
> > As I told you I'm not enough "good" to tell you what's wrong:( The 
> 
> > only thing I can say is that the &amp; in an hyperlink is correct.
> 
> To clarify: Generating a url for inclusion on a page works. The  
> encoded ampersands that separate the query parameters are appropriate
>  
> in that context. However if you hand that url to a WORedirect (not  
> rendered on a page and interpreted by a web browser) the encoded  
> ampersands are being sent to the server in the request. That fails  
> with the results I documented.
> 
> As I mentioned before I don't know how it *should* work (whether the 
> 
> request should gracefully handle encoded ampersands, or whether  
> WORedirect should convert the encoded ampersands before passing them 
> 
> on). All I know is that is where it is failing.
> 
> <snip>
> 
> >> Pre: {valueZero = "Zero"; valueTwo = "Two"; valueOne = "1"; }
> >> URL: /cgi-bin/WebObjects/TestRedirect.woa/-50628/wa/default? 
> >>
> valueZero=Zero&amp;valueTwo=Two&amp;valueOne=1&amp;wosid=LDHjmeMHbkGC
> 
> >> QGRnoremEw
> >> Post: {valueZero = ("Zero"); amp;valueTwo = ("Two"); amp;valueOne 
> 
> >> = ("1"); amp;wosid = ("LDHjmeMHbkGCQGRnoremEw"); }
> >> Keys: ("valueZero", "amp;valueTwo", "amp;valueOne", "amp;wosid")
> 
> > I'm asking this just to understand, why are you using "post" on a  
> > hyperlink?
> > If it's a form so there's nothing written in the (X)HTML source  
> > code and the form will submit with & as it's passing parameter  
> > (which is correct).
> > There's no "post" action for a hyperlink.
> >
> > Could you clarify what you trying to do?
> > It may be obvious, but I don't understand with my limited
> knowledge;)
> 
> Sorry, no post action. Poor choice of NSLog identifiers. The 'Pre'  
> string is the query dictionary before being sent, the 'URL' string is
>  
> the generated url, and the 'Post' string is the query dictionary in  
> the DirectAction request.
> 
> Also informative is to take a look at the raw query string  
> (everything after the '?' in the request url) in the request()
> 
> // in the DirectAction
>       NSLog.out.appendln("Query String: " + request().queryString());
> 
>  From a WOHyperlink request (a url rendered to a page and interpreted
>  
> by a browser) you get something like this:
> 
> productPK=15&wosid=blabla
> 
>  From a WORedirect request you get something like this:
> 
> productPK=15&amp;wosid=blabla
> 
> This is the problem (see disclaimer above). WO burps on decoding this
>  
> request, the result is that the keys for the resulting form values  
> dictionary have 'amp;' (everything after the &) appended to them.
> 
> As an ugly hack I'm calling replaceAll("&amp;", "&") on the url  
> before I hand it off to the WORedirect. Yuck.
> 
> --
> ;david
> 
> --
> David LeBer
> "I am codeferous!"
> Codeferous Software
> site:   http://www.codeferous.com
> blog: http://david.codeferous.com
> 
> 
> 
> 
> >  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
>
http://lists.apple.com/mailman/options/webobjects-dev/x01dev%40yahoo.fr
> 
> This email sent to [EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to