diff options
-rw-r--r-- | lib/net/http.rb | 3 | ||||
-rw-r--r-- | lib/net/http/header.rb | 2 | ||||
-rw-r--r-- | lib/net/imap.rb | 6 | ||||
-rw-r--r-- | lib/net/smtp.rb | 2 |
4 files changed, 6 insertions, 7 deletions
@@ -912,8 +912,7 @@ module Net #:nodoc: buf = "CONNECT #{@address}:#{@port} HTTP/#{HTTPVersion}\r\n" buf << "Host: #{@address}:#{@port}\r\n" if proxy_user - credential = ["#{proxy_user}:#{proxy_pass}"].pack('m') - credential.delete!("\r\n") buf << "Proxy-Authorization: Basic #{credential}\r\n" end buf << "\r\n" @@ -427,7 +427,7 @@ module Net::HTTPHeader end def basic_encode(account, password) - 'Basic ' + ["#{account}:#{password}"].pack('m').delete("\r\n") end private :basic_encode @@ -419,7 +419,7 @@ module Net send_command("AUTHENTICATE", auth_type) do |resp| if resp.instance_of?(ContinuationRequest) data = authenticator.process(resp.data.text.unpack("m")[0]) - s = [data].pack("m").gsub(/\n/, "") send_string_data(s) put_string(CRLF) end @@ -1007,8 +1007,8 @@ module Net if $1 "&-" else - base64 = [$&.encode(Encoding::UTF_16BE)].pack("m") - "&" + base64.delete("=\n").tr("/", ",") + "-" end }.force_encoding("ASCII-8BIT") end @@ -788,7 +788,7 @@ module Net def base64_encode(str) # expects "str" may not become too long - [str].pack('m').gsub(/\s+/, '') end IMASK = 0x36 |