xml - Why is curl sending the command-line before the message body in an HTTP PUT? -


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

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

I am sending a message body of XML I am receiving a complaint from the XML Parser on the server, which is not being allowed in Protocol. I added a --trace-aci option to the command line and see:

 => Send header, 270 bytes (0x10e) 0000: PUT / metadata / 036- Rohit. JPG HTTP / 1.1 0028: User -Agent: Curl / 7.1 9.4 (i386-Sep-Darwin 9.6.0) Libracle / 7.1 9.4 0068: OpenSSL / 0.9.8i Zlib / 1.2.3 0083: Host: Localhost: 8182 00 99: Accept: * / * 00A6: X-RequestIsAbsolutePath: F 00c2: content-type: application / xml 00e1: content-length: 235 00f6: expected: 100-release 010c: == Notice: 100-Continue = > Send data, 235 bytes (0xeb) 0000: Curl-V-H "X-requestISSolt path: F" "http: // localhost: 8182 / m 0040: tadata / 036-root.jpg". & Lt; Metadata>. & Lt; Core>. & Lt; ImageOrientati 0080: editable = "1" type = "unsigned">. & Lt; Value raw = "3" /> 00c0: & lt; / ImageOrientation> & lt; / Core>. & Lt; / Metadata>. 

Why is the command-line sent as part of the message part? Of course the XML Parser will complain. How can I get curl to stop it from happening and send the contents of the file passed in the form of logic of only -T option?

FYI: I have sent raw text to the server and, yes, the command line is actually being sent. FYI # 2: Using the latest Curl (7.1 9.4) on Mac OS X

Why send command-line as part of the message body?

Not so. Are you sure you did not put the command in / tmp / out ?

Curl does not even have access to the command line that appears in your ASCII trace, because things like quotation marks are defined by shell before passing for this program.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -