method

split_param_value

ruby latest stable - Class: WEBrick::HTTPAuth::DigestAuth

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.

split_param_value(string)
private

No documentation available.

# File lib/webrick/httpauth/digestauth.rb, line 274
      def split_param_value(string)
        ret = {}
        while string.bytesize != 0
          case string
          when /^\s*([\w\-\.\*\%\!]+)=\s*\"((\\.|[^\"])*)\"\s*,?/
            key = $1
            matched = $2
            string = $'
            ret[key] = matched.gsub(/\\(.)/, "\\1")
          when /^\s*([\w\-\.\*\%\!]+)=\s*([^,\"]*),?/
            key = $1
            matched = $2
            string = $'
            ret[key] = matched.clone
          when /^s*^,/
            string = $'
          else
            break
          end
        end
        ret
      end