cURL / Mailing Lists / curl-users / Single Mail


NTLM host name i18n

From: Dan Fandrich <>
Date: Mon, 26 Jan 2009 12:56:45 -0800

On Mon, Jan 26, 2009 at 01:27:24PM -0700, Jeff Rasmussen wrote:
> I am having an issue with ntlm authentication and curl. I have a windows web
> service setup and I can correctly connect using the following:
> curl -k --ntlm -d "Invoke" --user myUserName https://IPADDR/WebServiceURL
> returns:
> <?xml version="1.0" encoding="utf-8"?>
> <ReturnCode>1</ReturnCode>
> But if I try to connect with a username that contains special characters then I
> get an authentication error:
> curl -k --ntlm -d "Invoke" --user tÚd https://IPADDR/WebServiceURL

curl just passes the user string verbatim in the NTLM request. If the
character encoding doesn't match what the server expects, it won't work.
Once you figure out which encoding that is, you could convert it with a
command something like this (on a *NIX box):

 curl -k --ntlm -d Invoke --user `echo tÚd | iconv -t cp1252` https://IPADDR/WebServiceURL

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
List admin:
Received on 2009-01-26