We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12728ae commit ae08fafCopy full SHA for ae08faf
lib/webmachine/quoted_string.rb
@@ -28,7 +28,7 @@ def quote(str)
28
29
# Escapes quotes within a quoted string.
30
def escape_quotes(str)
31
- str.gsub(/"/, '\\"')
+ str.gsub('"', '\\"')
32
end
33
34
# Unescapes quotes within a quoted string
lib/webmachine/resource/authentication.rb
@@ -24,7 +24,7 @@ module Authentication
24
# @yieldparam [String] password the passed password
25
# @yieldreturn [true,false] whether the username/password is correct
26
def basic_auth(header, realm = 'Webmachine')
27
- if header =~ BASIC_HEADER && yield(*$1.unpack1('m*').split(/:/, 2))
+ if header =~ BASIC_HEADER && yield(*$1.unpack1('m*').split(':', 2))
true
else
%(Basic realm="#{realm}")
0 commit comments