cURL / Mailing Lists / curl-users / Single Mail

curl-users

SSL download missing 16,700 bytes (52: Empty Reply)

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Thu, 5 Sep 2002 06:52:46 -0400

I'm seeing something with curl that I've not ever noticed before;
wondering whether someone may have some insight as to what's going on.

Facts:

I've tried with version 7.9.8, in both cygwin and win32 flavors.
I've also tried the cygwin flavor of 7.10-pre2. All of the above exhibit
exactly the same behavior. I've also tried with and without the --trace
feature enabled.

I'm trying to download a .ZIP file, which is being returned from an ISAPI
extension (.dll) under IIS 4. The server is out of my control so I can't
easily duplicate the issue. I tried placing the .ZIP file on my own IIS 4
web server (not getting it through the internet or from that .dll) and it
works fine.

I can download this file properly using Internet Explorer, so the web
server is not simply skipping pieces.

I've tried using the --http1.0 flag (actually I used -0) to disable
http/1.1. Same problem still.

Symptom:

The .ZIP file is supposed to be 69,147 bytes long. But the file I get back
from curl is only 52,447 bytes long. The difference is 16,700 bytes.

Here's what the command line looks like:
  $ curl.exe -v -O -A "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)" \
  -b "cky.txt" -0 --trace trace.log \
  "https://-------.----.---/cgi-bin/HttpDownload.dll/Session_detail2002_07.zip"
   % Total % Received % Xferd Average Speed Time Curr.
                                  Dload Upload Total Current Left Speed
 100 52447 0 52447 0 0 18913 0 --:--:-- 0:00:02 --:--:-- 30652
 curl: (52) Empty reply from server

I compared this partial file with the real thing, and discovered that the FIRST
16,700 bytes were missing, rather than the last...

I looked at the trace log, and noticed that, while most "sections" of the
response were 8192 bytes long, the first one shown in trace.log was only
7876, which is 316 bytes different.

316 + 8192 + 8192 = 16,700...

Here's the first bit from trace.log:

  == Info: About to connect() to -------.----.---:443
  == Info: Connected to -------.----.--- (---.---.---.---) port 443
  == Info: SSL connection using RC4-MD5
  == Info: Server certificate:
           < cert info snipped >
  => Send header, 386 bytes (0x182)
  0000: 47 45 54 20 2f 63 67 69 2d 62 69 6e 2f 48 74 74 GET /cgi-bin/Htt
  0010: 70 44 6f 77 6e 6c 6f 61 64 2e 64 6c 6c 2f 53 65 pDownload.dll/Se
  0020: 73 73 69 6f 6e 5f 64 65 74 61 69 6c 32 30 30 32 ssion_detail2002
  0030: 5f 30 37 2e 7a 69 70 20 48 54 54 50 2f 31 2e 30 _07.zip HTTP/1.0
  0040: 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f ..User-Agent: Mo
  0050: 7a 69 6c 6c 61 2f 34 2e 30 20 28 4d 53 49 45 20 zilla/4.0 (MSIE
  0060: 35 2e 35 29 0d 0a 48 6f 73 74 3a 20 -- -- -- -- 5.5)..Host: ----
  0070: -- -- -- 2e -- -- -- -- 2e -- -- -- 0d 0a 50 72 ---.----.---..Pr
  0080: 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a agma: no-cache..
  0090: 41 63 63 65 70 74 3a 20 69 6d 61 67 65 2f 67 69 Accept: image/gi
  00a0: 66 2c 20 69 6d 61 67 65 2f 78 2d 78 62 69 74 6d f, image/x-xbitm
  00b0: 61 70 2c 20 69 6d 61 67 65 2f 6a 70 65 67 2c 20 ap, image/jpeg,
  00c0: 69 6d 61 67 65 2f 70 6a 70 65 67 2c 20 2a 2f 2a image/pjpeg, */*
  00d0: 0d 0a 43 6f 6f 6b 69 65 3a 20 55 73 65 72 4e 61 ..Cookie: UserNa
  00e0: 6d 65 3d 4d -- -- -- -- -- -- -- -- -- -- 0d 0a me=-----------..
  0180: 0d 0a ..
  <= Recv data, 7876 bytes (0x1ec4)
  0000: 36 2a 68 ce 02 2b c1 2d f0 c9 4a 93 ad 80 17 98 6*h..+.-..J.....
  0010: a3 6d 87 97 f4 26 fb dc 4b a6 1d e3 f9 8e 41 2e .m...&..K.....A.
  0020: a0 32 7e ca 51 d3 c3 56 67 e0 90 7a fa c7 f3 b9 .2~.Q..Vg..z....
  0030: 66 94 f4 43 f3 81 8c cd 7f 06 84 d5 7d 41 7b 1a f..C.......}A{.
  0040: 36 56 81 0e 78 97 55 ac 57 7d b5 07 32 36 1d e3 6V..x.U.W}..26..
  0050: b2 45 4e 61 b4 fd e8 1e 0d 2b 6b 0a 10 ec 32 70 .ENa.....+k...2p

Any thoughts?

--Kevin

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r
Received on 2002-09-05