× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: HTTP -- %20 at wrong time....
  • From: Rich Duzenbury <rduz@xxxxxxxxxxxxxxxxxxx>
  • Date: Sat, 20 Jan 2001 20:53:47 -0600

I'm not familiar with the way the AS/400 web server operates, but on the 
Apache server I normally use, the ACTION is simply the name of the script 
to execute, no need for the word 'EXEC (and a space).

And %20 is the ascii equivalent of a space.  The web client typically 
encodes certain "invalid" URL characters such as spaces and some other 
special characters using the %xx method.

If you must have the space in the URL, you should probably write or find an 
RPG  HTTPDecode routine.  The last web server I wrote, I used delphi, and 
it has a decent set of encode and decode routines in the HTTPAPP module.

If you need to roll your own,  the rules are as follows:

If the character is not a % or +, no translation needs be done.
If the character is a +, make it a space.
If the character is a %, and the next character is a %, then a literal one 
character % is needed.
Otherwise, the next two digits are the hex code of the requested character 
(generally in ASCII), e.g. %20 = space.

Regards,
Rich

At 09:16 PM 1/20/01 -0500, you wrote:
>Thanks in advance for any assistance provided.
>
>I recently tried to implement "Develop an RPG CGI Application"  by Edward 
>R Smith  <from Jan 97 News/400>.
>
>Everything seems to work cool, except that the
><FORM ACTION="EXEC QSYS.LIB/CGIBIN.LIB/GBKCL.PGM" METHOD=POST>
>
>comes thru as  "EXEC%20QSYS.LIB/CGIBIN.LIB/GBKCL.PGM",
>which causes a problem. <The Page cannot be displayed>
>
>I think the space is being sent thru as the ASCII code equivalent.
>
>THe article was written for V3R7,
>and my machine is a model 270 at V4R5M0.
>
>Anyone offer some advise plse...
>
>ta,
>kmh
>
>+---
>| This is the RPG/400 Mailing List!
>| To submit a new message, send your mail to RPG400-L@midrange.com.
>| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
>| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner/operator: david@midrange.com
>+---

Regards,
Rich

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-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 ...

Replies:

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.