Esempio n. 1
0
 /// <summary>
 /// If the value is a quoted-string as defined by <see href="https://tools.ietf.org/html/rfc7230#section-3.2.6">the RFC specification</see>,
 /// removes quotes and unescapes backslashes and quotes.
 /// </summary>
 /// <returns>An unescaped version of <see cref="Value"/>.</returns>
 public StringSegment GetUnescapedValue()
 {
     if (!HeaderUtilities.IsQuoted(_value))
     {
         return(_value);
     }
     return(HeaderUtilities.UnescapeAsQuotedString(_value));
 }
Esempio n. 2
0
    public void IsQuoted_BehaviorCheck(string input, bool expected)
    {
        var actual = HeaderUtilities.IsQuoted(input);

        Assert.Equal(expected, actual);
    }