My resource ends up failing in state g9 because request.if_match is nil. This can be fixed by changing:
# Escapes quotes within a quoted string.
def escape_quotes(str)
str.gsub(/"/, '\\"')
end
# Unescapes quotes within a quoted string
def unescape_quotes(str)
str.gsub(%r{\\}, '')
end
with
# Escapes quotes within a quoted string.
def escape_quotes(str)
String(str).gsub(/"/, '\\"')
end
# Unescapes quotes within a quoted string
def unescape_quotes(str)
String(str).gsub(%r{\\}, '')
end
But I'm not totally confident I'm doing everything correctly. Totally willing to make the change, but I want to confirm that this is, indeed, unexpected behavior. At the very least, this seems to cause a 415 to be returned, even though I suspect it should return something in the 500-series (since this is a server-side problem).