I bumped into this the other day in 5.5. I haven't had a chance to build 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 a text string a la
name1=value1&name2=value2 and simply send it with the request.

>From the docs:
/
The optional POSTARGS attribute specifies the post content for the request,
for example, a list of name-value pairs. They may not be specified with 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, and
name-value pairs must be separated with & (ampersand) characters.
Additionally, the names and values must be encoded. You may perform this
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 post arguments
(name-value pairs) with an array. The value of POSTARGARRAY is the name 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 error is returned. 

When the POSTARGS or POSTARGARRAY attribute is present, the type of HTTP
request issued by the <@URL> meta tag changes to POST from GET.
/

You can also work around this problem by always having a value, if possible,
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 Payment Notification to  
validate.

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 my  
witango server.  This shows that there is indeed a difference in the  
POST arguments!  Apparently witango 5.0.1.065 <@URL> is not POSTING  
an 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     1        
97              [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.taf

Reply via email to