Satya - Sunday, January 09, 2005 9:46:47 AM
Example html to upload a file
<form action="abc" enctype="multipart/form-data" method="post">
<p>file to upload
<input type="file" name="datafile" size="40">
<input type="submit" value="SendFile">
</p>
</form>
annonymous - Sunday, January 09, 2005 9:47:39 AM
This will showup in your browser as
Satya - Sunday, January 09, 2005 10:04:53 AM
Here are the headers when the above form is submitted
accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
referer:http://wks3012198:8181/akc/hds-test/fileupload.html
accept-language:en-us
content-type:multipart/form-data; boundary=---------------------------7d5265c153071a
accept-encoding:gzip, deflate
user-agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
host:wks3012198:8181
cookie:JSESSIONID=1CFAC21BDE638A0ED1C82FD43A5826F4
connection:Keep-Alive
cache-control:no-cache
content-length:4464
Satya - Sunday, January 09, 2005 10:07:33 AM
Here are the headers on a regular url submission
accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
accept-language:en-us
accept-encoding:gzip, deflate
user-agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
host:wks3012198:8181
connection:Keep-Alive
Satya - Sunday, January 09, 2005 11:43:35 AM
Here are the headers on a form post
accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
referer:http://wks3012198:8181/akc/hds-test/fileupload.html
accept-language:en-us
content-type:application/x-www-form-urlencoded
accept-encoding:gzip, deflate
user-agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
host:wks3012198:8181
cookie:JSESSIONID=4352C674B3EDA0EC272D77E734286E04
connection:Keep-Alive
cache-control:no-cache
content-length:11
Satya - Sunday, January 09, 2005 11:46:19 AM
Looks like the "enctype" is tranlsated into a "content-type" by the browser
Looks like the multipart form data when submitted goes to the server as a content type. One should be able to check this and determine that this is a mutipart request as opposed to a normal request
Satya - Sunday, January 09, 2005 11:49:46 AM
Headers on a form submitted as a "get"
accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
referer:http://wks3012198:8181/akc/hds-test/fileupload.html
accept-language:en-us
accept-encoding:gzip, deflate
user-agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
host:wks3012198:8181
connection:Keep-Alive
cookie:JSESSIONID=4352C674B3EDA0EC272D77E734286E04
authorization:Basic c2F0eWE6c2F0eWFr
See how the form get and a url submission are identical
Satya - Tuesday, March 01, 2005 7:41:01 PM
More information on form encoding
Satya - Wednesday, March 02, 2005 9:24:19 AM
HTTP status codes
This link will give you a list of the status codes from an http response.