From: Alexey Tafintsev Date: 2008-06-15T23:35:02+09:00 Subject: Re: How !isset in Ruby THANKS MANS !!!! Working :-)))) ---------------------------- #!c:/ruby/bin/ruby.exe $kcode = "windows-1251" require 'cgi' cgi = CGI.new user = ENV['AUTH_USER'] password = ENV['AUTH_PASSWD'] if (!defined?(ENV['AUTH_USER'])) then puts cgi.header({"Status" => "401 Authorization Required", "Type" => "text/html", "WWW-Authenticate" => "Basic realm=\"Web Password\""}) else if user == nil puts cgi.header({"Status" => "401 Authorization Required", "Type" => "text/html", "WWW-Authenticate" => "Basic realm=\"Web Password\""}) else real_password=password if real_password!=password puts cgi.header({"Status" => "401 Authorization Required", "Type" => "text/html", "WWW-Authenticate" => "Basic realm=\"Web Password\""}) end end end ---------------------------- -- Posted via http://www.ruby-forum.com/.