101 if ((c ==
';' || c ==
',' ||
char.IsWhiteSpace(c)) && (
c2 ==
'=' ||
char.IsWhiteSpace(
c2)))
133 if (num < 0 || num == i + 1)
137 return headerValue.AsSpan(i + 1, num - i - 1).Trim().ToString();
146 return headerValue.AsSpan(i, num - i).Trim().ToString();
160 int num2 =
s.IndexOf(
',', num);
167 if (num <
length &&
s[num] ==
' ')
176 array =
new string[1] { string.Empty };
190 for (
int i = 0; i <
length; i++)
203 if (
s[i + 1] ==
'u' && i <
length - 5)
211 c = (char)((num << 12) | (
num2 << 8) | (
num3 << 4) |
num4);
231 if ((c & 0
xFF80) == 0)
246 for (
int i = ((
length > 0 &&
s[0] ==
'?') ? 1 : 0); i <
length; i++)
276 text2 =
s.Substring(num, i - num);
286 if (i ==
length - 1 &&
s[i] ==
'&')
357 string text = Headers[
"Cookie"];
358 if (!
string.IsNullOrEmpty(
text))
377 string text = Headers[
"x-up-devcap-post-charset"];
378 if (
text !=
null &&
text.Length > 0)
420 if (
string.IsNullOrEmpty(Headers[
"Connection"]) ||
string.IsNullOrEmpty(Headers[
"Upgrade"]))
424 string[]
values = Headers.GetValues(
"Connection");
437 string[]
values2 = Headers.GetValues(
"Upgrade");
455 string text = Headers[
"Proxy-Connection"];
456 if (
string.IsNullOrEmpty(
text))
458 text = Headers[
"Connection"];
460 if (
string.IsNullOrEmpty(
text))
468 text = Headers[
"Keep-Alive"];
521 string text = Headers[
"Referer"];
585 *(ulong*)(8 + (
byte*)(&result)) =
RequestId;
596 string text = Headers[
"Transfer-Encoding"];
606 string text2 = Headers[
"Content-Length"];
671 if (
user !=
null &&
user.Identity !=
null)
673 return user.Identity.IsAuthenticated;
776 if (server.
Name.Length != 0)
852 System.
Net.
NetEventSource.
Info(
this,
$"RequestId:{RequestId} ConnectionId:{_connectionId} RawConnectionId:{memoryBlob.RequestBlob->RawConnectionId} UrlContext:{memoryBlob.RequestBlob->UrlContext} RawUrl:{_rawUrl} Version:{_version} Secure:{_sslStatus}",
".ctor");
853 System.
Net.
NetEventSource.
Info(
this,
$"httpContext:${httpContext} RequestUri:{RequestUri} Content-Length:{ContentLength64} HTTP Method:{HttpMethod}",
".ctor");
858 for (
int i = 0; i < Headers.Count; i++)
912 listenerClientCertAsyncResult.EndCalled =
true;
945 System.
Net.
NetEventSource.
Info(
this,
"Calling Interop.HttpApi.HttpReceiveClientCertificate size:" + num,
"BeginGetClientCertificateCore");
1005 global::Interop.HttpApi.HTTP_SSL_CLIENT_CERT_INFO*
ptr2 = (global::Interop.HttpApi.HTTP_SSL_CLIENT_CERT_INFO*)
ptr;
1008 System.
Net.
NetEventSource.
Info(
this,
"Calling Interop.HttpApi.HttpReceiveClientCertificate size:" + num,
"GetClientCertificateCore");
1019 num =
num2 +
ptr2->CertEncodedSize;
1028 System.
Net.
NetEventSource.
Info(
this,
$"pClientCertInfo:{(IntPtr)ptr2} pClientCertInfo->CertFlags: {ptr2->CertFlags} pClientCertInfo->CertEncodedSize: {ptr2->CertEncodedSize} pClientCertInfo->pCertEncoded: {(IntPtr)ptr2->pCertEncoded} pClientCertInfo->Token: {(IntPtr)ptr2->Token} pClientCertInfo->CertDeniedByMapper: {ptr2->CertDeniedByMapper}",
"GetClientCertificateCore");
1030 if (
ptr2->pCertEncoded !=
null)
1034 byte[]
array2 =
new byte[
ptr2->CertEncodedSize];
void Add(TKey key, TValue value)
static CultureInfo InvariantCulture
static int FromChar(int c)
static readonly Stream Null
override string ToString()
HttpListenerSession ListenerSession
ThreadPoolBoundHandle RequestQueueBoundHandle
SafeHandle RequestQueueHandle
static Uri GetRequestUri(string rawUri, string cookedUriScheme, string cookedUriHost, string cookedUriPath, string cookedUriQuery)
UrlDecoder(int bufferSize, Encoding encoding)
readonly Encoding _encoding
readonly char[] _charBuffer
static void FillFromString(NameValueCollection nvc, string s, bool urlencoded, Encoding encoding)
static string UrlDecodeStringFromStringInternal(string s, Encoding e)
static string[] ParseMultivalueHeader(string s)
static string GetCharSetValueFromHeader(string headerValue)
readonly ulong _requestId
NameValueCollection QueryString
RequestContextBase _memoryBlob
IPEndPoint RemoteEndPoint
unsafe Guid RequestTraceIdentifier
IntPtr OriginalBlobAddress
unsafe HttpListenerRequest(HttpListenerContext httpContext, RequestContextBase memoryBlob)
int GetClientCertificateErrorCore()
IPEndPoint _remoteEndPoint
IAsyncResult BeginGetClientCertificate(AsyncCallback? requestCallback, object? state)
IPEndPoint _localEndPoint
X509Certificate2? EndGetClientCertificate(IAsyncResult asyncResult)
X509Certificate2? GetClientCertificate()
X509Certificate2? ClientCertificate
readonly string _cookedUrlQuery
int _clientCertificateError
unsafe ListenerClientCertAsyncResult BeginGetClientCertificateCore(AsyncCallback requestCallback, object state)
CookieCollection ParseCookies(Uri uri, string setCookieHeader)
WebHeaderCollection _webHeaders
readonly HttpListenerContext _httpContext
int ClientCertificateError
BoundaryType _boundaryType
ListenerClientCertState ClientCertState
unsafe void GetClientCertificateCore()
readonly string _cookedUrlHost
ChannelBinding GetChannelBinding()
void DetachBlob(RequestContextBase memoryBlob)
CookieCollection _cookies
readonly SslStatus _sslStatus
Task< X509Certificate2?> GetClientCertificateAsync()
readonly string _cookedUrlPath
void SetClientCertificateError(int clientCertificateError)
static readonly bool SkipIOCPCallbackOnSuccess
static unsafe ChannelBinding GetChannelBindingFromTls(HttpListenerSession session, ulong connectionId)
static readonly Version Version11
override bool Equals([NotNullWhen(true)] object? comparand)
override string ToString()
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Associate(object first, object second, [CallerMemberName] string memberName=null)
unsafe void ReleasePins()
unsafe IntPtr OriginalBlobAddress
static unsafe? string PtrToStringUni(IntPtr ptr)
static unsafe? string PtrToStringAnsi(IntPtr ptr)
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
static string net_io_invalidendcall
static string Format(string resourceFormat, object p1)
static string net_listener_mustcall
static string net_listener_mustcompletecall
static string net_io_invalidasyncresult
static string net_listener_callinprogress
static Encoding GetEncoding(int codepage)
virtual char[] GetChars(byte[] bytes)
static new TaskFactory< TResult > Factory
static bool TryCreate([NotNullWhen(true)] string? uriString, UriKind uriKind, [NotNullWhen(true)] out Uri? result)