cURL / Mailing Lists / curl-library / Single Mail

curl-library

problems with post

From: chico_alves <chico_alves_at_uol.com.br>
Date: Fri, 12 Aug 2005 10:28:47 -0300

Hi list, I have had some problems when I use libCurl to try a post to a remote cgi asp program.
When I did the post with Mozilla browse everething goes ok as shows bellow.
I canīt understand why When Iīm using the curl (second text bellow), the lib donīt respond to
the 'Ack' sent by remote host.

Thanks for help,

Mozilla to remote cgi.
---------------------------

>>> Direction 1) Mozilla -> host

h...5.POST /remoteHost/Proc.asp?a=100&b=200 HTTP/1.1^M
Host: www.remoteHost.com^M
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) ^M
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5^M
Accept-Language: en-us,en;q=0.5^M
Accept-Encoding: gzip,deflate^M
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7^M
Keep-Alive: 300^M
Connection: keep-alive^M
Referer: /remoteHost/Proc.asp?a=100&b=200^M
Cookie: inicio=Sim;ASPSESSIONID=1234^M

>>> Direction 2) Mozilla -> browse

ack 672 win
6710 <nop,nop,timestamp 450232206 17707499>
E..4..@.3.Y...>...d..P.2..=.r......6%......
......1.

>>> Direction 3) Mozilla -> Host

ack 1 win 5840 <nop,nop,timestamp 17393691 449918419>
E.....@.@.M}..d...>....P...i;..F...........
. h...5.Content-Type: application/x-www-form-urlencoded^M
Content-Length: 28^M
^M
c
hkTest=1&cmdSubmit=Inform
1

>>> Direction 4) Host -> Mozilla

ack 771 win
6710 <nop,nop,timestamp 450232212 17707508>
E..4..@.3.Y...>...d..P.2..=.r......6%......
......1.
ack 771 win 6710 <nop,nop,timestamp 450232212 17707508>
E.....@.3.XK..>...d..P.2..=.r......6.C.....
......1.HTTP/1.1 302 Object moved^M
Date: Thu, 11 Aug 2005 22:47:54 GMT^M
Server: Microsoft-IIS/5.0^M
X-Powered-By: ASP.NET^M
Location: default.asp^M
Content-Length: 121^M
Content-Type: text/html; charset=ISO-8859-1^M
Cache-control: private^M
^M
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found here.</body>
>>>> and then continue with redirecting the new page.

===================================================================

libCurl to remote cgi.
---------------------------

>>> Direction 1) libCurl -> host

E..%b.@.@.9X..d......6.P.x..7..P.....}.....
..../^M..POST /remoteHost/Proc.asp?a=100&b=200 HTTP/1.1^M
User-Agent: agent/1.0^M
Host: www.remoteHost.com^M
Accept: */*^M
Accept-Encoding: deflate, gzip^M
Referer: /remoteHost/Proc.asp?a=100&b=200^M
Cookie: inicio=Sim;ASPSESSIONID=1234^M
Content-Length: 25^M
Content-Type: application/x-www-form-urlencoded^M
^M
a=100&b=200
2

>>> Direction 2) host -> libCurl

ack 1733 win 9648 <nop,nop,timestamp 789418902 17793420>
E..4.@@.9.........d..P.67..P.x....%.\$.....
/^M......

>>> Direction 3) host -> libCurl ***** (trying Ack again wiht no response!!) *****

ack 1733 win 9648 <nop,nop,timestamp 789418902 17793420>
E..4.A@.9.........d..P.67..P.x....%.\$.....
/^M......

>>> Direction 4) host -> libCurl **** (then send a default html page)

ack 1733 win 9648 <nop,nop,timestamp 789418903 17793420>
E....B@.9..I......d..P.67..P.x....%........
/^M......HTTP/1.1 200 OK^M
Date: Thu, 11 Aug 2005 23:02:13 GMT^M
Server: Microsoft-IIS/5.0^M
X-Powered-By: ASP.NET^M
Content-Length: 16279^M
Content-Type: text/html; charset=ISO-8859-1^M
Set-Cookie: inicio=Sim; expires=Sun, 21-Aug-2005 03:00:00 GMT; path=/^M
Cache-control: private^M
^M
<html>^M
<head>^M

>>>> and then continue with a wrong main page.
Received on 2005-08-12