×

Good News Everybody!

A new search engine is coming soon.

As a stop gap measure, we are using Google's custom search engine service.




It appears like the problem is Poster. It doesn't seem to send the POST data
to the program. Can anyone suggest a different program or Firefox extension
that can be used for testing programs like this? Free is preferred.

--
Mike Wills
http://mikewills.info
P: (507) 933-0880 | Skype: koldark


On Wed, Dec 23, 2009 at 11:35 AM, Mike <koldark@xxxxxxxxx> wrote:

I have been using the below listed article [1] to figure out how to pass
parameters to my RPG-CGI program. I have a problem getting the
CONTENT_LENGTH. It always seems to return 0. We are on V5R4.

[1] http://systeminetwork.com/node/26490

P*--------------------------------------------------
P* Procedure name: CgiParseInz
P* Purpose: http://systeminetwork.com/node/26490
P* Returns:
P*--------------------------------------------------
P CgiParseInz B EXPORT
D CgiParseInz PI 10I 0

D cgiBuffer S 4096A
D reqMethod S 10A
D nContentLen S 10I 0
D nBytesRead S 10I 0
D api_error S 64A Inz(*ALLX'00')
/free

reqMethod = %str(getenv('REQUEST_METHOD'));
nContentLen = %int(%str(getenv('CONTENT_LENGTH')));

if (reqMethod = 'POST' and nContentLen > 0);
//if (reqMethod = 'POST');
cgiParse('-i ':'CGII0100': cgiBuffer: %size(cgiBuffer) :
nBytesRead : api_error);
if (nBytesRead > 0);
putenv(%subst(cgiBuffer:1:nBytesRead)); // Set QRY_STR
putenv('REQUEST_METHOD=GET'); // Override method
endif;

endif;
return nBytesRead;
/end-free
P CgiParseInz E

I am claiming stupid here so I am not sure what I maybe doing wrong. I am
using Poster (a Mozilla plugin)(http://code.google.com/p/poster-extension/)
to test POST to this program.

--
Mike Wills
http://mikewills.info
P: (507) 933-0880 | Skype: koldark


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.