Adjust exception message for headers having non-ASCII chars (#55886)
authorBadre BSAILA <54767641+pedrobsaila@users.noreply.github.com>
Mon, 26 Jul 2021 11:57:33 +0000 (13:57 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Jul 2021 11:57:33 +0000 (13:57 +0200)
Reuse existing resource string.

Fixes #55310

src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs

index 1f2275e..fb6e690 100644 (file)
@@ -317,7 +317,7 @@ namespace System.Net.Http.QPack
 
                 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 @@ namespace System.Net.Http.QPack
             return true;
         }
     }
-}
\ No newline at end of file
+}