Click to See Complete Forum and Search --> : WebServer Implementation Confusion


Nemo99
December 23rd, 2004, 07:06 PM
I have been doing some work implementing a multithreaded webserver. A problem has arisen in posting a form to the webserver. My understanding is when a form is "posted" (as opposed to "get") - if the enctype is set to url form encoded, then all the form data is appended to the request as name value pairs. But when using IE and I post using the following code:

<form action="http://127.0.0.1" method="post" enctype="application/x-www-form-urlencoded" target="_blank">
Address<input name="address" type="text" value="127.0.0.1"><br>
<input name="submit" type="submit" value="submit">
</form>

I get the header with the content type and content length set correctly but there are no name value pairs appended. Actually the return looks like

POST / HTTP/1.1
Accept: */*
~~~~~~~: ~~~~:~~~~~~~~~~~~~~~~~~~~~~~~
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
~~~~~~~~~~~~~~~: ~~~~~ ~~~~~~~
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Host: 127.0.0.1
Content-Length: 31
Connection: Keep-Alive
Cache-Control: no-cache

This is all that is recieved, where are the name-value pairs??? I checked the socket code to make sure it read everything. What am I missing???
TIA