Squashed commit of the following:
commit
aaed5f64dd41e0993fcf6116695c72d997efab1f
Author: Russ Combs <rucombs@cisco.com>
Date: Wed Jan 25 09:01:39 2017 -0500
fix support for content strings with escaped quotes ("foo\"bar")
thanks to secres@linuxmail.org for reporting the issue
}
// fall through
case 1:
- if ( c == '"' )
+ if ( c == '"' and in[len-1] == '"' )
+ {
+ --len;
state = 2;
+ }
else if ( !isspace(c) )
ok = false;
break;
nx = 0;
state = 4;
}
- else if ( c == '"' )
- state = 9;
else
out += c;
break;
else if ( !isspace(c) )
ok = false;
break;
- case 9:
- if ( !isspace(c) )
- ok = false;
- break;
default:
assert(false);
}