[Seaside] POST fields vs GET fields

Randal L. Schwartz merlyn at stonehenge.com
Wed Mar 17 18:08:23 UTC 2010


>>>>> "Miguel" == Miguel Enrique Cobá Martinez <miguel.coba at gmail.com> writes:

Miguel> I found that this is the point where the fields are lost:

WAKom> fieldsOf: aKomRequest
Miguel> 	^aKomRequest method = 'POST'
Miguel> 		ifTrue: [ aKomRequest postFields ]
Miguel> 		ifFalse: [ aKomRequest getFields ]

[...]

Miguel> Or is this forbidden by some RFC standard

The most common CGI parser in the world, CGI.pm, has this to say:

    It is possible for a script to receive CGI parameters in the URL as well
    as in the fill-out form by creating a form that POSTs to a URL containing
    a query string (a "?" mark followed by arguments). The param() method will
    always return the contents of the POSTed fill-out form, ignoring the URL's
    query string. To retrieve URL parameters, call the url_param() method. Use
    it in the same way as param(). The main difference is that it allows you
    to read the parameters, but not set them.

    Under no circumstances will the contents of the URL query string interfere
    with similarly-named CGI parameters in POSTed forms. If you try to mix a
    URL query string with a form submitted with the GET method, the results
    will not be what you expect.

I trust Lincoln Stein to be following some official guideline on this, but he
doesn't quote it, unfortunately.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


More information about the seaside mailing list