Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 9c4fc85

Browse files
author
Konstantina Chremmou
committed
Reverted string interpolation to string.Format()
Signed-off-by: Konstantina Chremmou <[email protected]>
1 parent 7ebab5c commit 9c4fc85

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

csharp/autogen/src/HTTP.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,19 +570,19 @@ private static void AuthenticateProxy(ref Stream stream, Uri uri, IWebProxy prox
570570
throw new ProxyServerAuthenticationException("Stale nonce in Digest authentication attempt.");
571571
break;
572572
case "realm=":
573-
authenticationFieldReply += $", realm=\"{directives[++i]}\"";
573+
authenticationFieldReply += string.Format(", realm=\"{0}\"", directives[++i]);
574574
realm = directives[i];
575575
break;
576576
case "nonce=":
577-
authenticationFieldReply += $", nonce=\"{directives[++i]}\"";
577+
authenticationFieldReply += string.Format(", nonce=\"{0}\"", directives[++i]);
578578
nonce = directives[i];
579579
break;
580580
case "opaque=":
581-
authenticationFieldReply += $", opaque=\"{directives[++i]}\"";
581+
authenticationFieldReply += string.Format(", opaque=\"{0}\"", directives[++i]);
582582
opaque = directives[i];
583583
break;
584584
case "algorithm=":
585-
authenticationFieldReply += $", algorithm={directives[++i]}"; //unquoted; see RFC7616-3.4
585+
authenticationFieldReply += string.Format(", algorithm={0}", directives[++i]); //unquoted; see RFC7616-3.4
586586
algorithm = directives[i];
587587
break;
588588
case "qop=":
@@ -593,19 +593,19 @@ private static void AuthenticateProxy(ref Stream stream, Uri uri, IWebProxy prox
593593
qops.FirstOrDefault(q => q.ToLowerInvariant() == "auth-int") ??
594594
throw new ProxyServerAuthenticationException(
595595
"Digest authentication's quality-of-protection directive is not supported.");
596-
authenticationFieldReply += $", qop={qop}"; //unquoted; see RFC7616-3.4
596+
authenticationFieldReply += string.Format(", qop={0}", qop); //unquoted; see RFC7616-3.4
597597
}
598598
break;
599599
}
600600
}
601601

602602
string clientNonce = GenerateNonce();
603603
if (qop != null)
604-
authenticationFieldReply += $", cnonce=\"{clientNonce}\"";
604+
authenticationFieldReply += string.Format(", cnonce=\"{0}\"", clientNonce);
605605

606606
string nonceCount = "00000001"; // todo: track nonces and their corresponding nonce counts
607607
if (qop != null)
608-
authenticationFieldReply += $", nc={nonceCount}"; //unquoted; see RFC7616-3.4
608+
authenticationFieldReply += string.Format(", nc={0}", nonceCount); //unquoted; see RFC7616-3.4
609609

610610
Func<string, string> algFunc;
611611
var scratch1 = string.Join(":", credentials.UserName, realm, credentials.Password);
@@ -643,7 +643,7 @@ private static void AuthenticateProxy(ref Stream stream, Uri uri, IWebProxy prox
643643
: new[] {HA1, nonce, nonceCount, clientNonce, qop, HA2};
644644
var response = algFunc(string.Join(":", array3));
645645

646-
authenticationFieldReply += $", response=\"{response}\"";
646+
authenticationFieldReply += string.Format(", response=\"{0}\"", response);
647647

648648
WriteLine(header, stream);
649649
WriteLine(authenticationFieldReply, stream);

0 commit comments

Comments
 (0)