• Subject: Re: Mixing GET and POST Methods
  • From: Mel Rothman <mel@xxxxxxxxxxxxxx>
  • Date: Fri, 27 Jul 2001 00:40:25 -0500

Chris, 

I did some more digging and found that the problem is a CGIDEV2 bug that I fixed
since the last release was sent to Easy400.  The fix won't appear on Easy400
until the NEXT release.

In the meantime, you can fix it as follows:

1. SEU into CGIDEV2/QRPGLESRC member XXXCGIPARS
2. Change statement 273.00 (may be different  
   if not the latest version) in subprocedure 
   ZhbGetInput

   from
   C                   dow       l > 0 and k < %len(wk) 

   to
   C                   dow       l > 0 and k <= %len(wk)

3. Save the member.
4. Compile the member:
     CRTRPGMOD MODULE(CGIDEV2/XXXCGIPARS) +
     SRCFILE(CGIDEV2/QRPGLESRC) SRCMBR(XXXCGIPARS) +
     DBGVIEW(*SOURCE)
5. Update the service program:
     UPDSRVPGM SRVPGM(CGIDEV2/CGISRVPGM2) +
     MODULE(CGIDEV2/XXXCGIPARS)
6. End the HTTP server (ensures that the old service
   program won't be used by named activation groups)
7. Start the HTTP server.

Mel Rothman
CGIDEV2 Library Author
IBM Rochester

     
Mel Rothman wrote:
> 
> Chris,
> 
> First, ZhgGetInput automatically determines whether the
> request method is GET or POST, and handles the request
> transparently to you.  So, yes, you can mix GET and POST
> (i.e. use GET one time; POST the next; etc.).
> 
> http://.../weblibp/webcusinq.pgm?func=vrfyacct where func=vrfyacct
> should work, and a similar call to template4
> ( http://ctc40018:1942/cgidev2p/template4.pgm?custname=mel ) works
> correctly for me (it returns the value "mel" for customer name).
> 
> I do recall having a similar problem with the last variable
> not being seen by the CGI and don't remember whether
> installing the latest PTFs fixed it or whether I fixed it in
> CGIDEV2.
> 
> So, I suggest that you have the latest CGIDEV2 version and that
> your PTFs are up to date.
> 
> You can determine the installed CGIDEV2 version with
> http://.../cgidev2p/dspversion.pgm.  If the dspversion
> program is not found, you are definitely backlevel.  If it
> runs, and the version is earlier than 2001-05-18 10:14:02,
> you are backlevel and should download and install the
> current version from http://www.easy400.ibm.it/en
> 
> If the CGIDEV2 version is not the problem, I suggest installing
> the latest HTTP server PTFs for your OS/400 release.
> 
> I hope this helps.
> 
> Mel Rothman
> CGIDEV2 Library Author
> IBM Rochester
> 
> > "Christopher A. Libby" wrote:
> >
> > Here's another CGIDEV2 question:  Is it possible to mix GET and POST
> > methods when using the ZhbGetInput function of CGIDEV2?  I'm calling
> > my program like this:
> > http://.../weblibp/webcusinq.pgm?func=vrfyacct where func=vrfyacct
> > tells the program it must process the form results POSTed from the
> > browser.  When I call ZhbGetInput, all I get for a query string is
> > 'func='.
> >
> > Any ideas?
> >
> > -Chris
> >
> > ---------------------------------------------------------
> > Christopher A. Libby, Programmer/Analyst
> > Maine Public Service Company (www.mainepublicservice.com)
> > clibby@mainepublicservice.com (207) 768-5811 ext. 2210
> >
> >
+---
| This is the WEB400 Mailing List!
| To submit a new message, send your mail to WEB400@midrange.com.
| To subscribe to this list send email to WEB400-SUB@midrange.com.
| To unsubscribe from this list send email to WEB400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2024 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.