cURL / Mailing Lists / curl-library / Single Mail

curl-library

POST and Expect: header

From: Duncan Wilcox <duncan_at_mclink.it>
Date: Tue, 21 Jan 2003 16:56:20 +0100

Hi,

I'm using curl to script a site, this is the curl version string:

curl 7.10.3 (i386-portbld-freebsd4.6) libcurl/7.10.3 OpenSSL/0.9.6a ipv6
zlib/1.1.3

I'm running FreeBSD 4.6-RELEASE.

The problem I'm having is with a POST to an IIS server, uploading a file. In
case it makes any difference, the server is a secure server, I have a client
side certificate, and I'm using cookies, but the ascii trace shows that
something's going wrong:

... SSL stuff deleted ...
=> Send header, 557 bytes (0x22d)
0000: POST xxxxx
0040: xxxxx HTTP/1.1
004c: Authorization: Basic TUNMSU5LOk1DTElOSw==
0077: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
00b7: Host: xxxxxxxxxxxxxxx
00de: Pragma: no-cache
00f0: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
0132: Referer: xxxxxxxxxxxxxxxx
0172: xxxxx
017c: Cookie: ASPSESSIONIDSCTRQBBT=BILIFFHDCPHJGGHBCPDBAFIO
01b3: Content-Length: 720
01c8: Expect: 100-continue
01de: Content-Type: multipart/form-data; boundary=curlUxqbQzmt8RSbyBk3
021e: ghu7khSbCPg
022b:
=> Send data, 0 bytes (0x0)
=> Send data, 0 bytes (0x0)
=> Send data, 0 bytes (0x0)
... 1159 more lines like this deleted ...
=> Send data, 720 bytes (0x2d0)
0000: --curlUxqbQzmt8RSbyBk3ghu7khSbCPg
0023: Content-Disposition: form-data; name="xxxxx"; filename="xxxxxxxxx
0063: xxxxxxxxxxx"
007f: Content-Type: text/plain
0099:
... content deleted ...
0233:
0235:
0237: --curlUxqbQzmt8RSbyBk3ghu7khSbCPg
025a: Content-Disposition: form-data; name="xxxxx"
028c:
... content deleted ...
02ab: --curlUxqbQzmt8RSbyBk3ghu7khSbCPg--
<= Recv header, 23 bytes (0x17)
0000: HTTP/1.1 100 Continue
<= Recv header, 27 bytes (0x1b)
0000: Server: Microsoft-IIS/5.0
<= Recv header, 37 bytes (0x25)
0000: Date: Tue, 21 Jan 2003 14:52:18 GMT
<= Recv header, 36 bytes (0x24)
0000: HTTP/1.1 500 Internal Server Error
<= Recv header, 27 bytes (0x1b)
0000: Server: Microsoft-IIS/5.0
<= Recv header, 37 bytes (0x25)
0000: Date: Tue, 21 Jan 2003 14:52:18 GMT
<= Recv header, 21 bytes (0x15)
0000: Content-Length: 381
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 24 bytes (0x18)
0000: Cache-control: private
<= Recv data, 381 bytes (0x17d)
0000:
0002:
0004: <HTML>
000c:
000f: <BODY BGCOLOR='#002A3C'>
002b: . <font face="Arial" size=2>.<p>Persits.Upload.1</font> <font fa
006b: ce="Arial" size=2>error '800a000e'</font>.<p>.<font face="Arial"
00ab: size=2>Invalid data format. You must include ENCTYPE=&quot;mult
00eb: ipart/form-data&quot; in your FORM.</font>.<p>.<font face="Arial
012b: " size=2>/M_Richieste/Upload.asp</font><font face="Arial" size=2
016b: >, line 24</font>
== Info: Connection #0 left intact

I'm under the impression that curl isn't waiting for the "100 Continue"
response, is it correct? I'm willing to look into fixing this, if someone
will give me a pointer to the area of the sources that should be hacked.

Another minor problem I'm having is that curl --interface will coredump,
maybe there's an easy fix for this.

Thanks,
Duncan

-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
Received on 2003-01-21