method
split_param_value
ruby latest stable - Class:
WEBrick::HTTPAuth::DigestAuth
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