cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: 7.9.4 SSL formpost problem

From: Larry Fahnoe <fahnoe_at_FahnoeTech.com>
Date: Wed, 6 Feb 2002 11:34:59 -0600

Here are sets of headers from my testing yesterday, I'll get the formdata
patch in and test it shortly. For each of these, I've edited out the
resulting html and included a comment there if the destination web server
accepted the file upload or not. There really are no differences in the
headers between all the tests. Regarding "-vi", I've been using the long
format options & thus didn't match them up--no caffeen & at the keyboard
early this morning...bad combination.

Test 1: stock 7.9.3
--------------------------------------------
Command: /usr/bin/curl --max-time 300 --connect-timeout 15 --include --show-error --stderr - --verbose --silent --user-agent EDGARagent/1.0 --form "LiveTestFlag=Test" --form "BulkSingleFlag=Single" --form "session=1012941896441290614" --form "file=@/var/tmp/secdata.1015" "https://host-obscured/servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=1012941896441290614" |
* Establish HTTP proxy tunnel to host-obscured:443
> CONNECT host-obscured:443 HTTP/1.0
User-Agent: EDGARagent/1.0

 POST /servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=1012941896441290614 HTTP/1.1
User-Agent: EDGARagent/1.0
Host: host-obscured
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Length: 1744
Expect: 100-continue
Content-Type: multipart/form-data; boundary=curlTTb+wUFJteCe0vw8zoc9Uxjlyuk
HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.6 SP3
Date: Tue, 05 Feb 2002 20:45:01 GMT
Content-type: text/html
Connection: close

[ File transmitted okay, html results deleted ]

* Closing connection #0
curl stat: 0, signal: 0
--------------------------------------------

Test 2: stock 7.9.4
--------------------------------------------
Command: /usr/bin/curl --max-time 300 --connect-timeout 15 --include --show-error --stderr - --verbose --silent --user-agent EDGARagent/1.0 --form "LiveTestFlag=Test" --form "BulkSingleFlag=Single" --form "session=101294197399427137" --form "file=@/var/tmp/secdata.2430" "https://host-obscured/servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=101294197399427137" |
* Establish HTTP proxy tunnel to host-obscured:443
> CONNECT host-obscured:443 HTTP/1.0
User-Agent: EDGARagent/1.0

 POST /servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=101294197399427137 HTTP/1.1
User-Agent: EDGARagent/1.0
Host: host-obscured
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Length: 1735
Expect: 100-continue
Content-Type: multipart/form-data; boundary=curlY5Lnf6cmZglIH7UITijt1puWKMS

HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.6 SP3
Date: Tue, 05 Feb 2002 20:46:15 GMT
Content-type: text/html
Connection: close

[ File Transmission Problem, html results deleted ]

* Closing connection #0
curl stat: 0, signal: 0
--------------------------------------------

Test 3: 7.9.4 + http patch
--------------------------------------------
Command: /usr/bin/curl --max-time 300 --connect-timeout 15 --include --show-error --stderr - --verbose --silent --user-agent EDGARagent/1.0 --form "LiveTestFlag=Test" --form "BulkSingleFlag=Single" --form "session=1012942006008220674" --form "file=@/var/tmp/secdata.2524" "https://host-obscured/servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=1012942006008220674" |
* Establish HTTP proxy tunnel to host-obscured:443
> CONNECT host-obscured:443 HTTP/1.0
User-Agent: EDGARagent/1.0

 POST /servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=1012942006008220674 HTTP/1.1
User-Agent: EDGARagent/1.0
Host: host-obscured
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Length: 1738
Expect: 100-continue
Content-Type: multipart/form-data; boundary=curl6yVL8/Qf0YIa2tfqac8Y/4FLpso

HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.6 SP3
Date: Tue, 05 Feb 2002 20:46:48 GMT
Content-type: text/html
Connection: close

[ File Transmission Problem, html results deleted ]

* Closing connection #0
curl stat: 0, signal: 0
--------------------------------------------

Test 4: 7.9.4 + http patch + 7.9.3 ssluse
--------------------------------------------
Command: /usr/bin/curl --max-time 300 --connect-timeout 15 --include --show-error --stderr - --verbose --silent --user-agent EDGARagent/1.0 --form "LiveTestFlag=Test" --form "BulkSingleFlag=Single" --form "session=101294203568392761" --form "file=@/var/tmp/secdata.2669" "https://host-obscured/servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=101294203568392761" |
* Establish HTTP proxy tunnel to host-obscured:443
> CONNECT host-obscured:443 HTTP/1.0
User-Agent: EDGARagent/1.0

 POST /servlet/MultiHandlerServlet?handler=uploadfile&ftype=SingleTest&session=101294203568392761 HTTP/1.1
User-Agent: EDGARagent/1.0
Host: host-obscured
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Length: 1737
Expect: 100-continue
Content-Type: multipart/form-data; boundary=curlMAXePJ4tSFoPlhI0Fu2pxeyTdHb

HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.6 SP3
Date: Tue, 05 Feb 2002 20:47:18 GMT
Content-type: text/html
Connection: close

[ File Transmission Problem, html results deleted ]

* Closing connection #0
curl stat: 0, signal: 0
--------------------------------------------

On Wed, Feb 06, 2002 at 04:44:48PM +0100, Daniel Stenberg was mumbling:
> On Wed, 6 Feb 2002, Larry Fahnoe wrote:
>
> (This is a discussion between me and Larry Fahnoe and it is now being brought
> to the curl mailing list with Larry's permission. This is in regard to a
> formpost problem introduced in 7.9.4 not previously present.)
>
> > I'd be happy to use "curl -vi"; I'm not currently familiar with it. I'll
> > do that later on today. I can dummy up test data so that the results can
> > be shared.
>
> -vi is just -v and -i, that is verbose and include headers in output.
>
> > Is the fact that my test environment is using a proxy while the live
> > environment does not? Seems okay to me as curl in both environments
> > exhibits the same problem.
>
> I don't think you'll see any difference when using proxy or not, as I can't
> recall having done anything to the proxy stuff recently.
>
> I did however do some own tests and I think (*crosses fingers*) this patch
> fixes the problems you have:
>
> diff -u -r1.30 formdata.c
> --- lib/formdata.c 2002/01/29 20:30:56 1.30
> +++ lib/formdata.c 2002/02/06 15:38:41
> @@ -1065,6 +1065,9 @@
>
> do {
>
> + if(size)
> + size += AddFormDataf(&form, "\r\n");
> +
> /* boundary */
> size += AddFormDataf(&form, "--%s\r\n", boundary);
>
>
> Of course I eagerly await your comments on this!
>
> --
> Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
> ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol

-- 
Larry Fahnoe, Fahnoe Technology Consulting, fahnoe_at_FahnoeTech.com
952/925-0744      Minneapolis, Minnesota       www.FahnoeTech.com 
Received on 2002-02-06