cURL / Mailing Lists / curl-users / Single Mail

curl-users

NTLM host name i18n

From: Dan Fandrich <dan_at_coneharvesters.com>
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

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
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-01-26