From: Ron Jeffries Date: 2002-02-18T12:06:01+09:00 Subject: Re: net/http or webfetcher with pasworded urls On Mon, 18 Feb 2002 00:37:42 +0000 (UTC), Niklas Frykholm wrote: > > require 'net/http' > > Net::HTTP.start( 'auth.some.domain' ) {|http| > response , = http.get( '/need-auth.cgi', > 'Authentication' => > ["#{account}:#{password}"].pack('m').strip ) > print response.body > } Hmmm, when I do this it still gives the 401 error. Got me pretty confused, I must say ... Thanks, I'll keep tweaking. Guess I'll have to set up a password-protected page just to test on ... I can't publish the one I'm working on at the moment for folks to try. In my case I'm wanting to put in a regular get from /foobar.htm, not to a cgi file. As I mentioned in the first post, using the username and password in the url in a browser works fine. Thanks again, more ideas welcome! Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com I'm giving the best advice I have. You get to decide whether it's true for you.