[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTTPAPI 1.11 pre-release - truncationg data on a POST



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


Hi Eric,


I am missing the following from the end of input
        </DATA>' +
        '<DATA type="demographic" id="58112">CV</DATA>' + CRLF
        '<DATA type="extra" id="trigger">yes</DATA>' + CRLF +
        '</DATASET>' + CRLF;

The HTTP_url_encoder_addvar_s() routine can only handle an input value of 256 characters or less. Note the prototype:


      D http_url_encoder_addvar_s...
      D                 PR             1N
      D    peEncoder                        like(HTTP_URL_ENCODER) value
      D    peVariable                 50A   varying value
      D    peValue                   256A   varying value

See how the last parameter is 256A? That means it'll truncate anything longer than that.

There's another API called http_url_encoder_addvar() that's not limited in length (but unfortunately is slightly more cumbersome to use -- that's why addvar_s was added in fact, it was to simplify things somewhat)

Try changing your code so that it looks like this:

c                   callp     http_url_encoder_addvar( Enc
c                                                    : 'input'
c                                                    : %addr(ApiInp)+2
c                                                    : %len(ApiInp) )

That version of the code does not have the same length restrictions. Please let us know if this works, or if it doesn't.

Thanks
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------