cURL / Mailing Lists / curl-library / Single Mail


Malformed URL

From: Gottimukkala, Vidya <>
Date: Tue, 7 Apr 2009 08:55:25 -0400

Hi, I am trying to send an xml file to a URL (works as an API which
accepts xml - data, authorization (xml element parameter) is also a part
of xml file) . when I try to use the command as follows I get the error


The command I used: curl -v "/home/vidya/vidya_test1.xml" --header
"Content-Type: text/xml"



curl: (3) <url> malformed


I am completely new to curl, and am trying to use it to POST an XML file
to via HTTP request and then receive an xml response.


I have absolutely no idea how to resolve this, or even if I am using the
right options. Please help.


Thanks & Regards




Result upon using the command:


* <url> malformed

curl: (3) <url> malformed

* About to connect() to port 443 (#0)

* Trying connected

* Connected to ( port 443 (#0)

* CAfile: /etc/pki/tls/certs/ca-bundle.crt

  CApath: none

* SSL connection using SSL_RSA_WITH_RC4_128_MD5

* Server certificate:

* subject:,OU=Terms of use at

* start date: Nov 12 00:00:00 2007 GMT

* expire date: Nov 11 23:59:59 2009 GMT

* common name:

* issuer: Ref. LIABILITY
LTD.(c)97 VeriSign,OU=VeriSign International Server CA - Class
3,OU="VeriSign, Inc.",O=VeriSign Trust Network

> GET /hdde/xml/udi.asp HTTP/1.1

> User-Agent: curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2
NSS/ zlib/1.2.3 libidn/0.6.14 libssh2/0.18

> Host:

> Accept: */*

> Content-Type: text/xml


< HTTP/1.1 500 Internal Server Error

< Set-Cookie: ARPT=VYJKQWSweb6CKIKQ; path=/

< Date: Wed, 01 Apr 2009 20:31:31 GMT

< Server: Microsoft-IIS/6.0

< X-Powered-By: ASP.NET

< P3P: policyref="", CP="ADMa

< Content-Length: 244

< Content-Type: text/html

< Expires: Wed, 01 Apr 2009 20:31:31 GMT


< Cache-control: private


<?xml version="1.0" encoding="UTF-8"?>



                <Error>XML Parse Error Line 0, Character 0: XML document
must have a top level element.


                <Error>Unable to complete UDI Request</Error>



* Connection #0 to host left intact

* Closing connection #0

IMPORTANT NOTICE: This message is intended only for the addressee and may contain confidential, privileged information.
If you are not the intended recipient, you may not use, copy or disclose any information contained in the message.
If you have received this message in error, please notify the sender by reply e-mail and delete the message.
Received on 2009-04-07