From: yonatan_avraham@... Date: 2005-12-26T21:32:53+09:00 Subject: Re: How can I get soap4r to work with digest authentication? I fixed the problem of always sending the password in the clear by checking the HTTP and making sure that the server is indeed requesting basic realm. In class BasicAuth I added lines with +: def set(uri, user_id, passwd) uri = uri.clone + # Make sure that the server is really requesting Basic Authentication! + serverRealm = (@client.head(uri).header['WWW-Authenticate']).join + return nil if ("Basic realm".downcase != serverRealm[0,11].downcase) uri.path = uri.path.sub(/\/[^\/]*$/, '/') @auth[uri] = ["#{user_id}:#{passwd}"].pack('m').strip @client.reset_all end I forgot to mention that the digest authentication in the code I posted earlier is hardcoded to build the digest response with "POST" which always works for me, as I'm sending SOAP. I'm not sure how to get the correct HTTP method. (http-access2 is about 1700 lines of code and I haven't had a chance to understand the flow . . . )