Skip to content

Commit

Permalink
Adjust exception message for headers having non-ASCII chars (#55886)
Browse files Browse the repository at this point in the history
Reuse existing resource string.

Fixes #55310
  • Loading branch information
pedrobsaila authored Jul 26, 2021
1 parent 10c2383 commit 158fc37
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private static void EncodeValueStringPart(string s, Span<byte> buffer)

if (ch > 127)
{
throw new QPackEncodingException("ASCII header value.");
throw new QPackEncodingException(SR.net_http_request_invalid_char_encoding);
}

buffer[i] = (byte)ch;
Expand Down Expand Up @@ -402,4 +402,4 @@ private static bool EncodeHeaderBlockPrefix(Span<byte> destination, out int byte
return true;
}
}
}
}

0 comments on commit 158fc37

Please sign in to comment.