Menu

#1324 POST request args not dependably retrievable

4.1.1
closed
nobody
None
none
1
2018-12-16
2015-03-13
Tim
No

Hi. We installed 4.1.1 on aix yesterday and I discovered that when a POST method sends args to a rexx cgi script, you cannot dependably retrieve them:
example:

env = 'ENVIRONMENT'
reqmeth = Value('REQUEST_METHOD',,env)
Select
When reqmeth='POST' & Lines() Then args = Linein()
When reqmeth='GET' Then args = Value('QUERY_STRING',,env)
Otherwise Parse Arg args
End

the lines() command give no rows to read. you can reload the page 50 times and half of the time you get the args and half you don't.
Reverting 3.2.0 fixed the issue.
GETs work just fine.

Related

Bugs: #1324

Discussion

  • David Ashley

    David Ashley - 2015-03-13

    In this context the lines() function should never work at all. It should
    always return zero. The reason that that the lines() function only works
    for STREAMS contained in files. It does not work for any other STREAM
    type (memory buffers, stacks, etc.). In fact, the lines() function is
    can only return zero or one on PC/UNIX file systems, indicating whether
    or not there is data left to read from the file.

    In the case of a CGI program with a request method of POST you need to
    read the buffer with the linein() function until you get a blank line.
    That indicates the end of the STREAM in this instance. Each line you
    read will have a single attribute=value statement in it until you get to
    the blank line.

    David Ashley

    On 03/13/2015 12:00 PM, Tim wrote:


    [bugs:#1324] POST request args not dependably retrievable

    Status: open
    Group: 4.1.1
    Created: Fri Mar 13, 2015 05:00 PM UTC by Tim
    Last Updated: Fri Mar 13, 2015 05:00 PM UTC
    Owner: nobody

    Hi. We installed 4.1.1 on aix yesterday and I discovered that when a POST method sends args to a rexx cgi script, you cannot dependably retrieve them:
    example:

    env = 'ENVIRONMENT'
    reqmeth = Value('REQUEST_METHOD',,env)
    Select
    When reqmeth='POST' & Lines() Then args = Linein()
    When reqmeth='GET' Then args = Value('QUERY_STRING',,env)
    Otherwise Parse Arg args
    End

    the lines() command give no rows to read. you can reload the page 50 times and half of the time you get the args and half you don't.
    Reverting 3.2.0 fixed the issue.
    GETs work just fine.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oorexx/bugs/1324/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #1324

  • Rick McGuire

    Rick McGuire - 2018-12-16
    • status: open --> closed
     
  • Rick McGuire

    Rick McGuire - 2018-12-16

    Not sure this is relevant any more.

     

Anonymous
Anonymous

Add attachments
Cancel