diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-11 12:50:36 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-11 12:50:36 +0100 |
| commit | e2751d42e8775596b7c4b929fd004d879f980947 (patch) | |
| tree | da1d6e703abbb6a47cd64730603f06dc4b51df8f /SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs | |
| parent | ec1f5dc317182582ebff843c9e8a4d5277405469 (diff) | |
| parent | e5c2dbdf23267006ef151d6ee8ab1cea147123d7 (diff) | |
Merge branch 'dev' into code-cleanup
Diffstat (limited to 'SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs')
| -rw-r--r-- | SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs index 34b5eaf74..63790d796 100644 --- a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs +++ b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs @@ -28,11 +28,11 @@ namespace SocketHttpListener.Net // The raw path is parsed by looping through all characters from left to right. 'rawOctets' // is used to store consecutive percent encoded octets as actual byte values: e.g. for path /pa%C3%84th%2F/ // rawOctets will be set to { 0xC3, 0x84 } when we reach character 't' and it will be { 0x2F } when - // we reach the final '/'. I.e. after a sequence of percent encoded octets ends, we use rawOctets as + // we reach the final '/'. I.e. after a sequence of percent encoded octets ends, we use rawOctets as // input to the encoding and percent encode the resulting string into UTF-8 octets. // // When parsing ANSI (Latin 1) encoded path '/pa%C4th/', %C4 will be added to rawOctets and when - // we reach 't', the content of rawOctets { 0xC4 } will be fed into the ANSI encoding. The resulting + // we reach 't', the content of rawOctets { 0xC4 } will be fed into the ANSI encoding. The resulting // string 'Ä' will be percent encoded into UTF-8 octets and appended to requestUriString. The final // path will be '/pa%C3%84th/', where '%C3%84' is the UTF-8 percent encoded character 'Ä'. private List<byte> _rawOctets; @@ -146,7 +146,7 @@ namespace SocketHttpListener.Net if (!Uri.TryCreate(_requestUriString.ToString(), UriKind.Absolute, out _requestUri)) { - // If we can't create a Uri from the string, this is an invalid string and it doesn't make + // If we can't create a Uri from the string, this is an invalid string and it doesn't make // sense to try another encoding. result = ParsingResult.InvalidString; } @@ -196,7 +196,7 @@ namespace SocketHttpListener.Net } else { - // We found '%', but not followed by 'u', i.e. we have a percent encoded octed: %XX + // We found '%', but not followed by 'u', i.e. we have a percent encoded octed: %XX if (!AddPercentEncodedOctetToRawOctetsList(encoding, _rawPath.Substring(index, 2))) { return ParsingResult.InvalidString; @@ -207,7 +207,7 @@ namespace SocketHttpListener.Net else { // We found a non-'%' character: decode the content of rawOctets into percent encoded - // UTF-8 characters and append it to the result. + // UTF-8 characters and append it to the result. if (!EmptyDecodeAndAppendRawOctetsList(encoding)) { return ParsingResult.EncodingError; @@ -402,7 +402,7 @@ namespace SocketHttpListener.Net // Find end of path: The path is terminated by // - the first '?' character - // - the first '#' character: This is never the case here, since http.sys won't accept + // - the first '#' character: This is never the case here, since http.sys won't accept // Uris containing fragments. Also, RFC2616 doesn't allow fragments in request Uris. // - end of Uri string int queryIndex = uriString.IndexOf('?'); |
