By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,276 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,276 IT Pros & Developers. It's quick & easy.

Strange type of POST

P: n/a
I have to log into a website and retrieve some information. The problem is
that the post isn't "normal". I'm used to passing post values in the form
of: Variable1=Value1&Variable2=Value2 etc.

I used Live Http Headers to retrieve the POST information, I included it at
the end of this message.
Can anyone tell me how to make THIS kind of post?

Another thing,
"Content-Type: multipart/form-data;
boundary=---------------------------277301736415408"
This is the first time I see "boundary" as part of the post. What does this
mean?

Thx, here is a copy of the http post, I just replaced the UserName and
Password with bogus ones and the website address with "<Address Removed>"

btw, in Internet Explorer ieHTTPHeaders reports the same post information. I
say this this because at first I thought it was Mozilla the one who
"screwed" up the format :p
----------------------------------------------------

https://<Address Removed>/cgi-bin/login.pl?182425407173832-L_238_0-1

POST /cgi-bin/login.pl?182425407173832-L_238_0-1 HTTP/1.1
Host: <Address Removed>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://<Address Removed>/cgi-bin/login.pl
Content-Type: multipart/form-data;
boundary=---------------------------277301736415408
Content-Length: 359
-----------------------------277301736415408
Content-Disposition: form-data; name="UserName"

MyUserName
-----------------------------277301736415408
Content-Disposition: form-data; name="Password"

MyPassword
-----------------------------277301736415408
Content-Disposition: form-data; name="Comments"

MyComments
-----------------------------277301736415408--

HTTP/1.x 200 OK
Date: Mon, 01 Nov 2004 15:46:56 GMT
Server: Stronghold/4.0 Apache/1.3.22
Expires: Monday, 1-November-104 13:46:57 GMT
Pragma: no-cache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
its a standard multipart/form-data form POST. this format is usually used
when there is a <input type=file> control on the page. the post data looks
like any generic multipart mime attachment email message.

a boundary is defined in the header and is is used to delimit the mime-type
data. the mime data starts with a standard mime content header.

note: form-data is the form post data. the mime headers, data and boundary
are delmited by <lf>'s. there is an additional <lf> after the headers before
the data starts. files or attachments are usually base64 encoded (i forget
the mime-header, but you can look it up).

-- bruce (sqlwork.com)
"Manuel" <My@NoMailLand.com> wrote in message
news:p_********************@giganews.com...
I have to log into a website and retrieve some information. The problem is
that the post isn't "normal". I'm used to passing post values in the form
of: Variable1=Value1&Variable2=Value2 etc.

I used Live Http Headers to retrieve the POST information, I included it at the end of this message.
Can anyone tell me how to make THIS kind of post?

Another thing,
"Content-Type: multipart/form-data;
boundary=---------------------------277301736415408"
This is the first time I see "boundary" as part of the post. What does this mean?

Thx, here is a copy of the http post, I just replaced the UserName and
Password with bogus ones and the website address with "<Address Removed>"

btw, in Internet Explorer ieHTTPHeaders reports the same post information. I say this this because at first I thought it was Mozilla the one who
"screwed" up the format :p
----------------------------------------------------

https://<Address Removed>/cgi-bin/login.pl?182425407173832-L_238_0-1

POST /cgi-bin/login.pl?182425407173832-L_238_0-1 HTTP/1.1
Host: <Address Removed>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://<Address Removed>/cgi-bin/login.pl
Content-Type: multipart/form-data;
boundary=---------------------------277301736415408
Content-Length: 359
-----------------------------277301736415408
Content-Disposition: form-data; name="UserName"

MyUserName
-----------------------------277301736415408
Content-Disposition: form-data; name="Password"

MyPassword
-----------------------------277301736415408
Content-Disposition: form-data; name="Comments"

MyComments
-----------------------------277301736415408--

HTTP/1.x 200 OK
Date: Mon, 01 Nov 2004 15:46:56 GMT
Server: Stronghold/4.0 Apache/1.3.22
Expires: Monday, 1-November-104 13:46:57 GMT
Pragma: no-cache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.