' ' --> '-' '-' --> '%3A' '@' --> '%40' ',' --> '%2C'
Don't know if that's exhaustive, since there could be some other characters that haven't shown up in my testing.
The packet analyser shows my post back is now the same as what paypal sends me, except for the order of the arguments. Does anyone know how I can get them in actual order?
On Mar 14, 2006, at 12:19 PM, William M Conlon wrote:
Bingo!I was noticing the TCP packets were different -- paypal was application-x but witango post was text.Let me try that. On Mar 14, 2006, at 12:13 PM, Stefan Gonick wrote:I doubt that the order of the arguments affects anything. However, the different encoding may. It's also possible that the html content- type is not being set correctly. Witango doesn't do this by default. Robert came up with a workaround for this by including the needed information appendedto the useragent argument: <@URL location=" @@ request$HTTP_Post_URL"useragent="Witango Server <@VERSION><@CHAR 13><@CHAR 10> Content-Type: application/x-www-form-urlencoded"postargarray= "method$Post_Args" waitforresult= "true"> Stefan At 02:57 PM 3/14/2006, you wrote:Thx Robert, 1. yes, I'm using postargs, not postargarra 2. yes I'm using 5.0 But. 1. the first problem is that witango server is changing both the order and content of the POST argument from paypal (my notes 1 and 2 from prior email). 2. the second problem is that paypal is NOT doing encoding of everything. But anyway I have been using <@URLENCODE> as shown in the snip below. It looks to me that I need to manage encoding myself, converting 'space' to '+' and '@' to '%40' bill On Mar 14, 2006, at 11:03 AM, Robert Shubert wrote:I think you said you are now using postargs, not pastargarray. And I think you are on 5.0. Therefore you'll need to set encoding=url on the variable you call in postargs, since the default encoding of html will corrupt your post arg string. How's that sound? Robert -----Original Message----- From: William M Conlon [ mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 1:39 PM To: [email protected] Subject: Re: Witango-Talk: bug in <@URL> with null POST arguments?I decided to use ethereal to capture packets. never used it before,but WOW. Anyway, on to the actual problem, which appears to be related to encoding of the arguments. Here's a snip from the post from paypal: address_country=United+States&address_city=Palo+Alto ... &payer_email=bill%40tothept.com& Here's a snip from the post back to paypaladdress_city=Palo%20Alto&address_country=United% 20States ...&payer_email=bill%40tothept%2Ecom& A few things to note: 1. argument order is shuffled by witango as it loads the POSTARG_array alphabetically (which is the order it writes out the POST args in the log file, BTW). 2. witango is converting the '+' to a space when decoding the arguments ('Palo+Alto' ==> 'Palo Alto') 3. paypal is only URL encoding the '@', ignoring '.', ' ', and who know what elseSomeone please tell me I'm mistaken and this isn't as fouled up as itlooks right now. Bill On Mar 13, 2006, at 4:40 PM, Scott Cadillac wrote:Hi Bill, Try http://www.httpsniffer.com Hope that helps. Scott Cadillac, Email: [EMAIL PROTECTED] http://scott.cadillac.bz-----Original Message----- From: William M Conlon [ mailto:[EMAIL PROTECTED] Sent: Monday, March 13, 2006 5:31 PM To: [email protected]Subject: Re: Witango-Talk: bug in <@URL> with null POST arguments?Thanks, using POSTARGS instead of POSTARGARRAY allows me to includethe NULL variable. But I'm still getting an INVALID response from my post-back to paypal.As mentioned, I am testing by doing the postback to both paypal and my own witango server so I can inspect the POSTARGs in the witango log. The POSTARGs are identical -- I can cut and paste into a texteditor and they match exactly.But ... The length of the POSTARGs is different. So there must be some non-printing characters that witango is stripping. Next up is to get a hex dump of the two posts so I can compare. I don't reallyknow how to do this in Witango, so I'm about to write some Perl, unless someone has an HTTP Post dumper available. Bill On Mar 11, 2006, at 7:20 AM, Robert Shubert wrote:I bumped into this the other day in 5.5. I haven't had a chance tobuild a test case and report it. You should be able to pass null value postargs, but Witango doesn't seem to keep the pairs with null values. I believe the work around would be to not use the postargarray attribute, but to use postargs= which allows you to simply build atext stringa la name1=value1&name2=value2 and simply send it with the request.From the docs:/The optional POSTARGS attribute specifies the post content for therequest,for example, a list of name-value pairs. They may not be specifiedwith an array variable; to specify post arguments with an array, use the POSTARGARRAY attribute. The names and values must be separated with = (equal sign) characters, andname-value pairs must be separated with & (ampersand) characters.Additionally, the names and values must be encoded. You mayperformthis encoding using the <@URLENCODE> meta tag: Witango does not automatically encode data passed in the POSTARGS attribute. The optional POSTARGARRAY attribute is used to specify postarguments(name-value pairs) with an array. The value of POSTARGARRAY is thename of a variable containing an array of exactly two columns: the first column of the array must contain the names, and the second column must contain the values. Witango extracts these from the array and uses them in the HTTP request. If an array of more than two columns is referenced, an erroris returned.When the POSTARGS or POSTARGARRAY attribute is present, thetype ofHTTP request issued by the <@URL> meta tag changes to POST from GET. /You can also work around this problem by always having a value, ifpossible, usually some default is available to use. Robert -----Original Message----- From: William M Conlon [ mailto:[EMAIL PROTECTED] Sent: Friday, March 10, 2006 10:39 PM To: Witango-Talk Subject: Witango-Talk: bug in <@URL> with null POST arguments? I'm having a hard time getting Paypal Instant PaymentNotification tovalidate.The process requires me to post-back to Paypal the same data that they posted to me. I'm using Bryan Hughes' paypal_notify.taf as a prototype, but I can't get Paypal to respond to my POST-back with a'Verified' answer. I always get an 'Invalid' answer.I've investigate by running the same post-back to paypal and to mywitango server. This shows that there is indeed a difference in thePOST arguments! Apparently witango 5.0.1.065 <@URL> is not POSTINGan argument with a NULL value. So where Paypal sends me <snip> charset=windows-1252 custom= first_name=William </snip> Witango posts back: <snip> charset=windows-1252 first_name=William </snip> The debug trace shows that the custom variable is indeed in the post argument array: 10/03/2006 19:17:04 66.135.197.164 [EMAIL PROTECTED] -1470862416 197 [Changed Vars] request$postarg_array[11,1] =custom;request$postarg_array[11,2]=; Has anyone resolved this?Do I have to generate the entire HTTP post myself instead of using<@URL>? Bill______________________________________________________________ __________TO UNSUBSCRIBE: Go to http://www.witango.com/developer/ maillist.taf______________________________________________________________ __________TO UNSUBSCRIBE: Go to http://www.witango.com/developer/ maillist.tafBill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com ______________________________________________________________ __________TO UNSUBSCRIBE: Go to http://www.witango.com/developer/ maillist.taf__________________________________________________________________ ___ ___TO UNSUBSCRIBE: Go to http://www.witango.com/developer/ maillist.tafBill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com___________________________________________________________________ ___ __TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf___________________________________________________________________ ___ __TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.tafBill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com____________________________________________________________________ ____TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf===================================================== Database WebWorks: Dynamic web sites through database integration http://www.DatabaseWebWorks.com_____________________________________________________________________ ___ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/ maillist.tafBill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com______________________________________________________________________ __TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
Bill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
