curl-users
problem with Content-Type: application/binary returned from a post
Date: Wed, 18 May 2005 16:10:57 -0500
Weird to say but I am not postive what version of curl I am using, I am
using curl via a database application called Panorama
on osx 10.3.8 which provides curl 7.10.2 (powerpc-apple-darwin7.0)
libcurl/7.10.2 OpenSSL/0.9.7b zlib/1.1.4 but from fink
i also had curl 7.11.1 (powerpc-apple-darwin7.5.0) libcurl/7.11.1
OpenSSL/0.9.7d ipv6 zlib/1.1.4 or maybe its built into panorama
but that seems unlikely.
So i use a procedure in the database to build the curl line it takes 4
posts to get logged in and to the point where I am requesting the
file I want and requires probably way to much effort, have to do string
manipulation to get the cookie set via javascript etc but finally
got it all working up to this point where it should be downloading my file.
Here is the output of live http headers (site address removed...)
POST /cgi-bin/CaseFiled-Rpt.pl?117132197544983-L_56_1-1 HTTP/1.1
Host: xxxx
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://xxxx/cgi-bin/CaseFiled-Rpt.pl?480271943932415-L_56_0-1
Cookie: xxxxUser=xxxx6517 hhBb61in/AQ
Content-Type: multipart/form-data;
boundary=---------------------------49624435616998899912076122696
Content-Length: 62
----------------------------49624435616998899912076122696--
Once it says all that firefox prompts me to save the file
here is the output of --trace-ascii
=> Send header, 576 bytes (0x240)
0000: POST /cgi-bin/CaseFiled-Rpt.pl?101551106276801-L_56_1-1 HTTP/1.1
0042: User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-U
0082: S; rv:1.7.5) Gecko/20041107 Firefox/1.0
00ab: Cookie: xxxxUser=xxxx9835
00eb: McLzen9d.h6
00fb: Host: xxxx
0118: Pragma: no-cache
012a: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
016c: Referer: https://xxxx/cgi-bin/CaseFiled-Rpt.pl?
01ac: 424227049726554-L_56_0-1
01c6: Content-Length: 132
01db: Expect: 100-continue
01f1: Content-Type: multipart/form-data; boundary=curlVuVzvqCHEe2w65BX
0231: p6zf8jvXxKh
023e:
<= Recv header, 23 bytes (0x17)
0000: HTTP/1.1 100 Continue
=> Send data , 132 bytes (0x84)
0000: --curlVuVzvqCHEe2w65BXp6zf8jvXxKh
0023: Content-Disposition: form-data; name="button1"
0053:
0055: Continue
005f: --curlVuVzvqCHEe2w65BXp6zf8jvXxKh--
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 37 bytes (0x25)
0000: Date: Wed, 18 May 2005 20:57:19 GMT
<= Recv header, 38 bytes (0x26)
0000: Server: Stronghold/4.0 Apache/1.3.22
<= Recv header, 56 bytes (0x38)
0000: Content-disposition: inline; filename=CaseFiledRPT.txt
<= Recv header, 19 bytes (0x13)
0000: Connection: close
<= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
<= Recv header, 57 bytes (0x39)
0000: Content-Type: application/binary; name=CaseFiledRPT.txt
<= Recv data, 1030 bytes (0x406)
0000: 3ff
0005: <HR><CENTER><TABLE BORDER=1 BGCOLOR=WHITE WIDTH="400"><TR><TH CO
0045: LSPAN=4><FONT SIZE=+1 COLOR=DARKRED>blah blah
As you can see I get the html, it mentions the file but I dont get the file.
Any help or ideas would be greatly appreciated.
- text/x-vcard attachment: bart.vcf