cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Problems using cURLl to Form Post a file above 50K

From: Meyer, Aaron <Aaron.Meyer_at_ONSTAR.com>
Date: Tue, 5 Oct 2004 09:54:49 -0400

> On Tues, 5 Oct 2004, Stenberg Daniel wrote:

> < HTTP/1.1 502 Bad Gateway
> < Date: Mon, 04 Oct 2004 18:34:52 GMT
> < Content-Length: 333
> < Content-Type: text/html
> < Server: NetCache appliance (NetApp/5.3.1R2)
> <HTML>
> <HEAD><TITLE>502 Bad Gateway</TITLE></HEAD>
> <BODY>

> This response is given by your proxy, right?

>I think that one is to blame for this, but no, I cannot explain why you can
do
>the same operation manually. I suggest you use a network analyzer (like
>ethereal) to figure out the differences and then attempt to make the curl
>command line look more like the browser's request. Or if something looks
like
>a bug: post it here.

Thank you for the reply. I will attempt to analyze the transaction.

As an added bit of information, I have found that even on successful
transactions using cURL, I still initially get an error message. However,
my connection is not closed, and the file is then sent. Again, this only
works for files smaller than 80K. A successful transaction looks like the
following:

C:\CURL>"C:\CURL\"curl -v --proxy 155.55.55.1:80 --proxy-user id:passwd -F
"txtUserName=id2" -F "txtPassword=passwd2" -F txtDomain=xxx" -F
"file1=Customer.txt" -F "fileType=CUSTOMER" https://staging/upload.asp

* About to connect() to 155.55.55.1 port 80
* Connected to 155.55.55.1 (155.55.55.1) port 80
* Proxy auth using Basic with user 'id'
> POST http://curl HTTP/1.1
Proxy-Authorization: Basic bnp6YzZyOnQwdGFsYmF0Mg==
User-Agent: curl/7.12.0 (i386-pc-win32) libcurl/7.12.0 OpenSSL/0.9.7d
zlib/1.2.1

Host: curl
Pragma: no-cache
Accept: */*
Content-Length: 63766
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=----------------------------2efbe2fb
f956

< HTTP/1.1 502 Bad Gateway
< Date: Tue, 05 Oct 2004 13:17:27 GMT
< Content-Length: 333
< Content-Type: text/html
< Server: NetCache appliance (NetApp/5.3.1R2)
<HTML>
<HEAD><TITLE>502 Bad Gateway</TITLE></HEAD>
<BODY>
<H1>Bad Gateway</H1>
<H4>
The following error occurred:<P>
The host name was not found during the DNS lookup. Contact your system
administr
ator if the problem is.not found by retrying the URL. (DNS_HOST_NOT_FOUND)
</H4>
<HR>
Please contact the administrator.
</BODY>
</HTML>
* Connection #0 to host curl left intact
* About to connect() to 155.55.55.1 port 80
* Connected to 155.55.55.1 (155.55.55.1) port 80
* Establish HTTP proxy tunnel to staging:443
* Proxy auth using Basic with user 'id'
< HTTP/1.0 200 Connection established
< Proxy-Agent: NetCache NetApp/5.3.1R2
<
* Proxy replied OK to CONNECT request
* successfully set certificate verify locations:
* CAfile: C:\CURL\curl-ca-bundle.crt
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
* subject: /C=US/ST=California/L=Torrance/O=AHM Inc.
/OU=eBusiness/OU=Terms of use at www.verisign.com/rpa (c)00/CN=staging.com
* start date: 2004-07-07 00:00:00 GMT
* expire date: 2005-07-07 23:59:59 GMT
* common name: staging.com (matched)
* issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign
Interna
tional Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY
LTD.
(c)97 VeriSign
* SSL certificate verify ok.
> POST /upload.asp HTTP/1.1
User-Agent: curl/7.12.0 (i386-pc-win32) libcurl/7.12.0 OpenSSL/0.9.7d
zlib/1.2.1

Host: staging.com
Pragma: no-cache
Accept: */*
Content-Length: 63766
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=----------------------------c0927ad4
a422

< HTTP/1.1 100 Continue
< Server: Microsoft-IIS/5.0
< Date: Tue, 05 Oct 2004 13:17:28 GMT
< X-Powered-By: ASP.NET
< Set-cookie: SaneID=166.66.66.1-3407141730923; path=/; expires=Tue,
05-Oct-09
13:17:28 GMT
< HTTP/1.1 200 OK
< Server: Microsoft-IIS/5.0
< Date: Tue, 05 Oct 2004 13:17:28 GMT
< X-Powered-By: ASP.NET
< Set-cookie: SaneID=166.66.66.1-3407141730923; path=/; expires=Tue,
05-Oct-09
13:17:28 GMT
< Content-Length: 2845
< Content-Type: text/html
< Cache-control: private

<html>
<head>
<script language='javascript'>
function validate() {...

I would be surprised if this is a bug in cURL, it does seem to be the proxy
that is giving me the problems. I was hoping this might look familiar to
someone. I will attempt to use Ethereal.

Aaron
Received on 2004-10-05