60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.Extensions
|
|
{
|
|
// Token: 0x020019C0 RID: 6592
|
|
[Token(Token = "0x20019C0")]
|
|
[StructLayout(3)]
|
|
public sealed class WWWAuthenticateHeaderParser : KeyValuePairList
|
|
{
|
|
// Token: 0x0600B139 RID: 45369 RVA: 0x0029666C File Offset: 0x0029486C
|
|
[Token(Token = "0x600B139")]
|
|
[Address(RVA = "0x1CA1500", Offset = "0x1C9FF00", VA = "0x181CA1500")]
|
|
public WWWAuthenticateHeaderParser(string headerValue)
|
|
{
|
|
List<HeaderValue> list = this.ParseQuotedHeader(headerValue);
|
|
this.<Values>k__BackingField = list;
|
|
}
|
|
|
|
// Token: 0x0600B13A RID: 45370 RVA: 0x00296690 File Offset: 0x00294890
|
|
[Token(Token = "0x600B13A")]
|
|
[Address(RVA = "0x1CA12C0", Offset = "0x1C9FCC0", VA = "0x181CA12C0")]
|
|
private List<HeaderValue> ParseQuotedHeader(string str)
|
|
{
|
|
List<HeaderValue> list = new List();
|
|
if (str != 0)
|
|
{
|
|
int num = 0;
|
|
Func<char, bool> <>9__1_ = WWWAuthenticateHeaderParser.<>c.<>9__1_0;
|
|
if (<>9__1_ == 0)
|
|
{
|
|
WWWAuthenticateHeaderParser.<>c.<>9__1_0 = delegate(char ch)
|
|
{
|
|
if (char.IsWhiteSpace(ch))
|
|
{
|
|
}
|
|
return !char.IsControl(ch);
|
|
};
|
|
}
|
|
string text = Extensions.Read(str, num, <>9__1_, true).TrimAndLower();
|
|
list.Add(new HeaderValue
|
|
{
|
|
<Key>k__BackingField = text
|
|
});
|
|
int stringLength = str.m_stringLength;
|
|
string text3;
|
|
string text2 = text3.TrimAndLower();
|
|
HeaderValue headerValue = new HeaderValue();
|
|
headerValue.<Key>k__BackingField = text2;
|
|
str.SkipWhiteSpace(num);
|
|
string text4 = str.ReadPossibleQuotedText(num);
|
|
headerValue.<Value>k__BackingField = text4;
|
|
}
|
|
return list;
|
|
}
|
|
}
|
|
}
|