cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl sending command-line in message body

From: Paul J. Lucas <paul_at_lucasmail.org>
Date: Mon, 4 May 2009 10:16:13 -0700

I'm issuing the command (line broken for readability):

        curl -H"X-RequestIsAbsolutePath: F" \
        -T /tmp/out \
        -H'Content-Type: application/xml' \
        "http://localhost:8182/metadata/036-Rotated.JPG"

I'm sending a message body of XML. I get a complaint from the XML
parser on the server about content not being allowed in the prolog. I
added a --trace-acii option to the command line and see:

=> Send header, 270 bytes (0x10e)
0000: PUT /metadata/036-Rotated.JPG HTTP/1.1
0028: User-Agent: curl/7.19.4 (i386-apple-darwin9.6.0) libcurl/7.19.4
0068: OpenSSL/0.9.8i zlib/1.2.3
0083: Host: localhost:8182
0099: Accept: */*
00a6: X-RequestIsAbsolutePath: F
00c2: Content-Type: application/xml
00e1: Content-Length: 235
00f6: Expect: 100-continue
010c:
== Info: Done waiting for 100-continue
=> Send data, 235 bytes (0xeb)
0000: curl -v -H"X-RequestIsAbsolutePath: F" "http://localhost:8182/me
0040: tadata/036-Original.JPG".<metadata>. <Core>. <ImageOrientati
0080: on editable="1" type="unsignedShort">. <value raw="3"/>.
00c0: </ImageOrientation>. </Core>.</metadata>.

Why is curl sending the command-line itself as part of the message
body? Of course the XML parser will complain. How can I get curl to
stop doing that and send only the contents of the file passed as an
argument to the -T option?

- Paul
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-05-04