Subject: RE: POST request!

From: "Fred Bohle" <[email-masked]>
Date: Thu, 5 Sep 2002 08:02:57 -0500

If the body of the POST request is the result of filling out a form,
then the contents are name,value pairs as you expect.  They will be
url-encoded just like the GET request would be, but the name,value
pairs are in the body, not the end of the url.

Most CGI programs I have seen parse EITHER the end of the URL (query
variables) for the GET method, OR they parse the body text for the POST
method.  BUT NOT BOTH.  It is possible to send such a request, but
I don't know how to get a standard browser to do it.  If you are writing
your own sender, you could build such a request, but most CGI programs
will ignore the url query variables.

Fred

-----Original Message-----
From: Naresh Agarwal [mailto:[email-masked]]
Sent: Thursday, September 05, 2002 1:02 AM
To: [email-masked]
Subject: POST request!

Hi

How the POST request is sent internally? Is the body of POST  request is sent as (name, value) pair?

Also can i send a POST request along with some parameters, some thing like below?

----------
POST /servername/some_virtual_directory/somefile.asp?id=x&name=y
Some headers...

and then body..
-------------

thanks,
regards,
Naresh Agarwal

---

From: "Larry Masinter" <[email-masked]>
Date: Thu, 5 Sep 2002 09:49:33 -0700

The format for forms submission is not in the HTTP specification,
it's in the HTML specification. Other forms languages might
use different formats and protocols for transmission of forms data.

HTML 4.0.1 http://www.w3.org/TR/html401/interact/forms.html#h-17.13
specifies how different attributes of the FORM element
(method, enctype) control how the form data is encoded,
at least when the 'action' is a HTTP URI. There are only
3 cases specified:
 method get, enctype application/x-www-form-urlencoded
 method post, enctype application/x-www-form-urlencoded
 method post, enctype multipart/form-data

There is no combination of parameters in HTML 4.0.1 defined
that will generate combinations of url encoding and
form-data. While some forms processors will also accept ';'
instead of '&' as a field separator in
application/x-www-form-urlencoded, it isn't mandated
in HTML 4.0.1.

Of course, other kinds of forms are possible, and compatible
with HTTP, but not necessarily with different HTTP server's
predefined modules for handling HTML forms.