Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: POST vs GET & their intermingling.

by merlyn (Sage)
on Dec 29, 2000 at 22:34 UTC ( [id://48854]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: POST vs GET & their intermingling.
in thread POST vs GET & their intermingling.

I came to this same conclusion after reading the specification for the FORM tag.
Hmm. I just skimmed through that specification, and couldn't see how you came to that conclusion.

There seems to be three uncorrelated elements:

  1. Whether the form parameters to be sent can come from both the action attribute and the form elements themselves (unclear in the spec)
  2. Whether those parmeters are encoded using GET or POST methods (selected by the form's method attribute)
  3. Whether the CGI processing agent should interpret query-string parameters in addition to content parameters when using the POST method (not specified at all in that referenced spec - that would be in a CGI spec)
Did you read something I didn't?

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Re: Re: POST vs GET & their intermingling.

Replies are listed 'Best First'.
(Ovid) Re(4): POST vs GET & their intermingling.
by Ovid (Cardinal) on Dec 29, 2000 at 22:45 UTC
    I'm curious about something in it, too:
    action %URI; #REQUIRED -- server-side form handler --
    Perhaps I am misunderstanding how they use their terms, but I thought action was an optional attribute, but this states that it is required. By default, action is the same URL from which the browser received the request. While I always explicitly state the action, I can see the utility of occasionally leaving this tag off. Is this something that has changed in the specification?

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: Re: Re: Re: POST vs GET & their intermingling.
by boo_radley (Parson) on Dec 29, 2000 at 22:51 UTC
    under the attribute the w3 spec lists :
    method      (GET|POST)

    I inferred (ass-u-me-d:) ) that to properly submit data, you should only use one or the other, discounting the idea that someone could read in the url to retrieve GET data. On a side note, I see that CGI.pm says
    start_form() will return a <FORM> tag with the optional method, action + and form encoding that you specify. The defaults are: method: POST action: this script enctype: application/x-www-form-urlencoded
    while w3's spec says
    method = get|post [CI] This attribute specifies which HTTP method will be used to submit the +form data set. Possible (case-insensitive) values are "get" (the defa +ult) and "post". See the section on form submission for usage informa +tion.
    And find it mildly amusing that the default methods disagree. Which, it seems is often the case for web standards documents.
      And find it mildly amusing that the default methods disagree. Which, it seems is often the case for web standards documents.
      There's no disagreement there at all. If CGI.pm isn't told which method to use, it generates a "method=POST" string. If a web agent isn't told which to do, it uses GET by default. Two different levels. No conflict.

      -- Randal L. Schwartz, Perl hacker

      I know this is an old message, but someone may find it in a search like I did.

      The CGI module spec doesn't disagree with the W3C spec for the FORM tag. They're not referring to the same thing.

      In HTML, the action property of the form tag is not optional. If you want to, you can leave it as an empty string (action="") and you will still pass the validator.

      In CGI's start_form() method, the action method is optional. If you don't define the action property of the start_form method, it will create a form tag with an action property that points to the current script.

      --
      -- GhodMode
      
        As merlyn noted in his post, made a tad over five years ago.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://48854]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-23 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found