From 04e7190d207b5b7423c5362b9605257724bdb813 Mon Sep 17 00:00:00 2001 From: pedrobsaila Date: Sun, 18 Jul 2021 19:51:10 +0200 Subject: [PATCH] adjust exception message for headers having non-ASCII chars --- .../System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs index 1f2275ebb15ff..fb6e690b01ddc 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs @@ -317,7 +317,7 @@ private static void EncodeValueStringPart(string s, Span buffer) if (ch > 127) { - throw new QPackEncodingException("ASCII header value."); + throw new QPackEncodingException(SR.net_http_request_invalid_char_encoding); } buffer[i] = (byte)ch; @@ -402,4 +402,4 @@ private static bool EncodeHeaderBlockPrefix(Span destination, out int byte return true; } } -} \ No newline at end of file +}