Modified Cookie.cs, CookieCollection.cs
This commit is contained in:
parent
9bf4adfbab
commit
48dbb4a811
Binary file not shown.
@ -111,7 +111,7 @@ namespace Example
|
|||||||
"notification-message-im");
|
"notification-message-im");
|
||||||
};
|
};
|
||||||
|
|
||||||
//ws.SetCookie(new Cookie("nobita", "idiot"));
|
//ws.SetCookie(new Cookie("nobita", "\"idiot, gunfighter\""));
|
||||||
//ws.SetCookie(new Cookie("dora", "tanuki"));
|
//ws.SetCookie(new Cookie("dora", "tanuki"));
|
||||||
ws.Connect();
|
ws.Connect();
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -40,18 +40,21 @@ using System.Collections;
|
|||||||
namespace WebSocketSharp.Net {
|
namespace WebSocketSharp.Net {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a set of properties and methods to use to manage the HTTP Cookie.
|
/// Provides a set of properties and methods used to manage an HTTP Cookie.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The Cookie class cannot be inherited.
|
/// <para>
|
||||||
|
/// The Cookie class supports the following cookie formats:
|
||||||
|
/// <see href="http://web.archive.org/web/20020803110822/http://wp.netscape.com/newsref/std/cookie_spec.html">Netscape specification</see>,
|
||||||
|
/// <see href="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</see> and
|
||||||
|
/// <see href="http://www.ietf.org/rfc/rfc2965.txt">RFC 2965</see>.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// The Cookie class cannot be inherited.
|
||||||
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public sealed class Cookie
|
public sealed class Cookie {
|
||||||
{
|
|
||||||
// Supported cookie formats are:
|
|
||||||
// Netscape: http://home.netscape.com/newsref/std/cookie_spec.html
|
|
||||||
// RFC 2109: http://www.ietf.org/rfc/rfc2109.txt
|
|
||||||
// RFC 2965: http://www.ietf.org/rfc/rfc2965.txt
|
|
||||||
|
|
||||||
#region Static Private Fields
|
#region Static Private Fields
|
||||||
|
|
||||||
@ -79,7 +82,7 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Public Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Cookie"/> class.
|
/// Initializes a new instance of the <see cref="Cookie"/> class.
|
||||||
@ -135,15 +138,8 @@ namespace WebSocketSharp.Net {
|
|||||||
public Cookie (string name, string value)
|
public Cookie (string name, string value)
|
||||||
: this ()
|
: this ()
|
||||||
{
|
{
|
||||||
string msg;
|
Name = name;
|
||||||
if (!CanSetName (name, out msg))
|
Value = value;
|
||||||
throw new CookieException (msg);
|
|
||||||
|
|
||||||
if (!CanSetValue (value, out msg))
|
|
||||||
throw new CookieException (msg);
|
|
||||||
|
|
||||||
this.name = name;
|
|
||||||
this.val = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -465,23 +461,28 @@ namespace WebSocketSharp.Net {
|
|||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="string"/> that contains the Value of the cookie.
|
/// A <see cref="string"/> that contains the Value of the cookie.
|
||||||
/// </value>
|
/// </value>
|
||||||
|
/// <exception cref="CookieException">
|
||||||
|
/// <para>
|
||||||
|
/// The value specified for a set operation is <see langword="null"/>.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// - or -
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// The value specified for a set operation contains a string not enclosed in double quotes
|
||||||
|
/// that contains an invalid character.
|
||||||
|
/// </para>
|
||||||
|
/// </exception>
|
||||||
public string Value {
|
public string Value {
|
||||||
get { return val; }
|
get { return val; }
|
||||||
set {
|
set {
|
||||||
if (value == null) {
|
string msg;
|
||||||
val = String.Empty;
|
if (!CanSetValue (value, out msg))
|
||||||
return;
|
throw new CookieException (msg);
|
||||||
}
|
|
||||||
|
|
||||||
// LAMESPEC: According to .Net specs the Value property should not accept
|
val = value.IsEmpty ()
|
||||||
// the semicolon and comma characters, yet it does. For now we'll follow
|
? "\"\""
|
||||||
// the behaviour of MS.Net instead of the specs.
|
: value;
|
||||||
/*
|
|
||||||
if (value.IndexOfAny(reservedCharsForValue) != -1)
|
|
||||||
throw new CookieException("Invalid value. Value cannot contain semicolon or comma characters.");
|
|
||||||
*/
|
|
||||||
|
|
||||||
val = value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,7 +513,7 @@ namespace WebSocketSharp.Net {
|
|||||||
static bool CanSetName (string name, out string message)
|
static bool CanSetName (string name, out string message)
|
||||||
{
|
{
|
||||||
if (name.IsNullOrEmpty ()) {
|
if (name.IsNullOrEmpty ()) {
|
||||||
message = "Name can not be null or empty.";
|
message = "Name must not be null or empty.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -528,7 +529,7 @@ namespace WebSocketSharp.Net {
|
|||||||
static bool CanSetValue (string value, out string message)
|
static bool CanSetValue (string value, out string message)
|
||||||
{
|
{
|
||||||
if (value.IsNull ()) {
|
if (value.IsNull ()) {
|
||||||
message = "Value can not be null.";
|
message = "Value must not be null.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,7 +549,7 @@ namespace WebSocketSharp.Net {
|
|||||||
return i ^ (j << 13 | j >> 19) ^ (k << 26 | k >> 6) ^ (l << 7 | l >> 25) ^ (m << 20 | m >> 12);
|
return i ^ (j << 13 | j >> 19) ^ (k << 26 | k >> 6) ^ (l << 7 | l >> 25) ^ (m << 20 | m >> 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
// See par 3.6 of RFC 2616
|
// See para 3.6 of RFC 2616
|
||||||
string Quote (string value)
|
string Quote (string value)
|
||||||
{
|
{
|
||||||
if (version == 0 || value.IsToken ())
|
if (version == 0 || value.IsToken ())
|
||||||
@ -559,7 +560,7 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
string ToResponseStringVersion0 ()
|
string ToResponseStringVersion0 ()
|
||||||
{
|
{
|
||||||
var result = new StringBuilder ();
|
var result = new StringBuilder (64);
|
||||||
result.AppendFormat ("{0}={1}", name, val);
|
result.AppendFormat ("{0}={1}", name, val);
|
||||||
if (expires != DateTime.MinValue)
|
if (expires != DateTime.MinValue)
|
||||||
result.AppendFormat ("; Expires={0}",
|
result.AppendFormat ("; Expires={0}",
|
||||||
@ -583,7 +584,7 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
string ToResponseStringVersion1 ()
|
string ToResponseStringVersion1 ()
|
||||||
{
|
{
|
||||||
var result = new StringBuilder ();
|
var result = new StringBuilder (64);
|
||||||
result.AppendFormat ("{0}={1}; Version={2}", name, val, version);
|
result.AppendFormat ("{0}={1}; Version={2}", name, val, version);
|
||||||
if (expires != DateTime.MinValue)
|
if (expires != DateTime.MinValue)
|
||||||
result.AppendFormat ("; Max-Age={0}", MaxAge);
|
result.AppendFormat ("; Max-Age={0}", MaxAge);
|
||||||
@ -595,7 +596,10 @@ namespace WebSocketSharp.Net {
|
|||||||
result.AppendFormat ("; Domain={0}", domain);
|
result.AppendFormat ("; Domain={0}", domain);
|
||||||
|
|
||||||
if (!port.IsNullOrEmpty ())
|
if (!port.IsNullOrEmpty ())
|
||||||
result.AppendFormat ("; Port={0}", port);
|
if (port == "\"\"")
|
||||||
|
result.Append ("; Port");
|
||||||
|
else
|
||||||
|
result.AppendFormat ("; Port={0}", port);
|
||||||
|
|
||||||
if (!comment.IsNullOrEmpty ())
|
if (!comment.IsNullOrEmpty ())
|
||||||
result.AppendFormat ("; Comment={0}", comment.UrlEncode ());
|
result.AppendFormat ("; Comment={0}", comment.UrlEncode ());
|
||||||
@ -647,7 +651,7 @@ namespace WebSocketSharp.Net {
|
|||||||
if (version == 0)
|
if (version == 0)
|
||||||
return String.Format ("{0}={1}", name, val);
|
return String.Format ("{0}={1}", name, val);
|
||||||
|
|
||||||
var result = new StringBuilder ();
|
var result = new StringBuilder (64);
|
||||||
result.AppendFormat ("$Version={0}; {1}={2}", version, name, val);
|
result.AppendFormat ("$Version={0}; {1}={2}", version, name, val);
|
||||||
if (!path.IsNullOrEmpty ())
|
if (!path.IsNullOrEmpty ())
|
||||||
result.AppendFormat ("; $Path={0}", path);
|
result.AppendFormat ("; $Path={0}", path);
|
||||||
@ -661,7 +665,10 @@ namespace WebSocketSharp.Net {
|
|||||||
result.AppendFormat ("; $Domain={0}", domain);
|
result.AppendFormat ("; $Domain={0}", domain);
|
||||||
|
|
||||||
if (!port.IsNullOrEmpty ())
|
if (!port.IsNullOrEmpty ())
|
||||||
result.AppendFormat ("; $Port={0}", port);
|
if (port == "\"\"")
|
||||||
|
result.Append ("; $Port");
|
||||||
|
else
|
||||||
|
result.AppendFormat ("; $Port={0}", port);
|
||||||
|
|
||||||
return result.ToString ();
|
return result.ToString ();
|
||||||
}
|
}
|
||||||
|
@ -62,20 +62,20 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Static Field
|
#region Private Static Fields
|
||||||
|
|
||||||
static CookieCollectionComparer Comparer = new CookieCollectionComparer ();
|
static CookieCollectionComparer Comparer = new CookieCollectionComparer ();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Field
|
#region Private Fields
|
||||||
|
|
||||||
List<Cookie> list;
|
List<Cookie> list;
|
||||||
object sync;
|
object sync;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor
|
#region Public Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="CookieCollection"/> class.
|
/// Initializes a new instance of the <see cref="CookieCollection"/> class.
|
||||||
@ -87,7 +87,7 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Property
|
#region Internal Properties
|
||||||
|
|
||||||
internal IList<Cookie> List {
|
internal IList<Cookie> List {
|
||||||
get { return list; }
|
get { return list; }
|
||||||
@ -182,7 +182,7 @@ namespace WebSocketSharp.Net {
|
|||||||
if (name.IsNull ())
|
if (name.IsNull ())
|
||||||
throw new ArgumentNullException ("name");
|
throw new ArgumentNullException ("name");
|
||||||
|
|
||||||
foreach (var cookie in list) {
|
foreach (var cookie in Sorted) {
|
||||||
if (cookie.Name.Equals (name, StringComparison.InvariantCultureIgnoreCase))
|
if (cookie.Name.Equals (name, StringComparison.InvariantCultureIgnoreCase))
|
||||||
return cookie;
|
return cookie;
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Private Method
|
#region Private Methods
|
||||||
|
|
||||||
static CookieCollection ParseRequest (string value)
|
static CookieCollection ParseRequest (string value)
|
||||||
{
|
{
|
||||||
@ -216,9 +216,8 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
Cookie cookie = null;
|
Cookie cookie = null;
|
||||||
int version = 0;
|
int version = 0;
|
||||||
string [] pairs = value.Split (',', ';');
|
string [] pairs = Split(value).ToArray();
|
||||||
for (int i = 0; i < pairs.Length; i++)
|
for (int i = 0; i < pairs.Length; i++) {
|
||||||
{
|
|
||||||
string pair = pairs [i].Trim ();
|
string pair = pairs [i].Trim ();
|
||||||
if (pair.IsEmpty ())
|
if (pair.IsEmpty ())
|
||||||
continue;
|
continue;
|
||||||
@ -235,27 +234,32 @@ namespace WebSocketSharp.Net {
|
|||||||
cookie.Domain = pair.GetValueInternal ("=");
|
cookie.Domain = pair.GetValueInternal ("=");
|
||||||
}
|
}
|
||||||
else if (pair.StartsWith ("$port", StringComparison.InvariantCultureIgnoreCase)) {
|
else if (pair.StartsWith ("$port", StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
if (!pair.Equals ("$port", StringComparison.InvariantCultureIgnoreCase) && !pair.EndsWith ("\"")) {
|
var port = pair.Equals ("$port", StringComparison.InvariantCultureIgnoreCase)
|
||||||
var buffer = new StringBuilder (pair);
|
? "\"\""
|
||||||
string port;
|
: pair.GetValueInternal ("=");
|
||||||
while (i < pairs.Length - 1) {
|
|
||||||
port = pairs [++i].Trim ();
|
|
||||||
buffer.AppendFormat (", {0}", port);
|
|
||||||
if (port.EndsWith ("\""))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
pair = buffer.ToString ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cookie.IsNull ())
|
if (!cookie.IsNull ())
|
||||||
cookie.Port = pair.GetValueInternal ("=");
|
cookie.Port = port;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!cookie.IsNull ())
|
if (!cookie.IsNull ())
|
||||||
cookies.Add (cookie);
|
cookies.Add (cookie);
|
||||||
|
|
||||||
cookie = new Cookie (pair.GetNameInternal ("="), pair.GetValueInternal ("="));
|
string name;
|
||||||
|
string val = String.Empty;
|
||||||
|
int pos = pair.IndexOf ('=');
|
||||||
|
if (pos == -1) {
|
||||||
|
name = pair;
|
||||||
|
}
|
||||||
|
else if (pos == pair.Length - 1) {
|
||||||
|
name = pair.Substring (0, pos).TrimEnd (' ');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
name = pair.Substring (0, pos).TrimEnd (' ');
|
||||||
|
val = pair.Substring (pos + 1).TrimStart (' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
cookie = new Cookie (name, val);
|
||||||
if (version != 0)
|
if (version != 0)
|
||||||
cookie.Version = version;
|
cookie.Version = version;
|
||||||
}
|
}
|
||||||
@ -272,9 +276,8 @@ namespace WebSocketSharp.Net {
|
|||||||
var cookies = new CookieCollection ();
|
var cookies = new CookieCollection ();
|
||||||
|
|
||||||
Cookie cookie = null;
|
Cookie cookie = null;
|
||||||
string [] pairs = value.Split (',', ';');
|
string [] pairs = Split(value).ToArray();
|
||||||
for (int i = 0; i < pairs.Length; i++)
|
for (int i = 0; i < pairs.Length; i++) {
|
||||||
{
|
|
||||||
string pair = pairs [i].Trim ();
|
string pair = pairs [i].Trim ();
|
||||||
if (pair.IsEmpty ())
|
if (pair.IsEmpty ())
|
||||||
continue;
|
continue;
|
||||||
@ -284,7 +287,7 @@ namespace WebSocketSharp.Net {
|
|||||||
cookie.Version = Int32.Parse (pair.GetValueInternal ("=").Trim ('"'));
|
cookie.Version = Int32.Parse (pair.GetValueInternal ("=").Trim ('"'));
|
||||||
}
|
}
|
||||||
else if (pair.StartsWith ("expires", StringComparison.InvariantCultureIgnoreCase)) {
|
else if (pair.StartsWith ("expires", StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
var buffer = new StringBuilder (pair.GetValueInternal ("="));
|
var buffer = new StringBuilder (pair.GetValueInternal ("="), 32);
|
||||||
if (i < pairs.Length - 1)
|
if (i < pairs.Length - 1)
|
||||||
buffer.AppendFormat (", {0}", pairs [++i].Trim ());
|
buffer.AppendFormat (", {0}", pairs [++i].Trim ());
|
||||||
|
|
||||||
@ -314,21 +317,12 @@ namespace WebSocketSharp.Net {
|
|||||||
cookie.Domain = pair.GetValueInternal ("=");
|
cookie.Domain = pair.GetValueInternal ("=");
|
||||||
}
|
}
|
||||||
else if (pair.StartsWith ("port", StringComparison.InvariantCultureIgnoreCase)) {
|
else if (pair.StartsWith ("port", StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
if (!pair.Equals ("port", StringComparison.InvariantCultureIgnoreCase) && !pair.EndsWith ("\"")) {
|
var port = pair.Equals ("port", StringComparison.InvariantCultureIgnoreCase)
|
||||||
var buffer = new StringBuilder (pair);
|
? "\"\""
|
||||||
string port;
|
: pair.GetValueInternal ("=");
|
||||||
while (i < pairs.Length - 1) {
|
|
||||||
port = pairs [++i].Trim ();
|
|
||||||
buffer.AppendFormat (", {0}", port);
|
|
||||||
if (port.EndsWith ("\""))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
pair = buffer.ToString ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cookie.IsNull ())
|
if (!cookie.IsNull ())
|
||||||
cookie.Port = pair.GetValueInternal ("=");
|
cookie.Port = port;
|
||||||
}
|
}
|
||||||
else if (pair.StartsWith ("comment", StringComparison.InvariantCultureIgnoreCase)) {
|
else if (pair.StartsWith ("comment", StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
if (!cookie.IsNull ())
|
if (!cookie.IsNull ())
|
||||||
@ -354,7 +348,21 @@ namespace WebSocketSharp.Net {
|
|||||||
if (!cookie.IsNull ())
|
if (!cookie.IsNull ())
|
||||||
cookies.Add (cookie);
|
cookies.Add (cookie);
|
||||||
|
|
||||||
cookie = new Cookie (pair.GetNameInternal ("="), pair.GetValueInternal ("="));
|
string name;
|
||||||
|
string val = String.Empty;
|
||||||
|
int pos = pair.IndexOf ('=');
|
||||||
|
if (pos == -1) {
|
||||||
|
name = pair;
|
||||||
|
}
|
||||||
|
else if (pos == pair.Length - 1) {
|
||||||
|
name = pair.Substring (0, pos).TrimEnd (' ');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
name = pair.Substring (0, pos).TrimEnd (' ');
|
||||||
|
val = pair.Substring (pos + 1).TrimStart (' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
cookie = new Cookie (name, val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,9 +399,33 @@ namespace WebSocketSharp.Net {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static IEnumerable<string> Split (string value)
|
||||||
|
{
|
||||||
|
var buffer = new StringBuilder (64);
|
||||||
|
bool quoted = false;
|
||||||
|
foreach (char c in value) {
|
||||||
|
if (c == '"') {
|
||||||
|
quoted = !quoted;
|
||||||
|
}
|
||||||
|
else if (c == ',' || c == ';') {
|
||||||
|
if (!quoted) {
|
||||||
|
yield return buffer.ToString ();
|
||||||
|
buffer.Length = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer.Append (c);
|
||||||
|
}
|
||||||
|
|
||||||
|
yield return buffer.ToString ();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Method
|
#region Internal Methods
|
||||||
|
|
||||||
internal static CookieCollection Parse (string value, bool response)
|
internal static CookieCollection Parse (string value, bool response)
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1574,10 +1574,18 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="T:WebSocketSharp.Net.Cookie">
|
<member name="T:WebSocketSharp.Net.Cookie">
|
||||||
<summary>
|
<summary>
|
||||||
Provides a set of properties and methods to use to manage the HTTP Cookie.
|
Provides a set of properties and methods used to manage an HTTP Cookie.
|
||||||
</summary>
|
</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
|
<para>
|
||||||
|
The Cookie class supports the following cookie formats:
|
||||||
|
<see href="http://web.archive.org/web/20020803110822/http://wp.netscape.com/newsref/std/cookie_spec.html">Netscape specification</see>,
|
||||||
|
<see href="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</see> and
|
||||||
|
<see href="http://www.ietf.org/rfc/rfc2965.txt">RFC 2965</see>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
The Cookie class cannot be inherited.
|
The Cookie class cannot be inherited.
|
||||||
|
</para>
|
||||||
</remarks>
|
</remarks>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WebSocketSharp.Net.Cookie.#ctor">
|
<member name="M:WebSocketSharp.Net.Cookie.#ctor">
|
||||||
@ -1830,6 +1838,18 @@
|
|||||||
<value>
|
<value>
|
||||||
A <see cref="T:System.String" /> that contains the Value of the cookie.
|
A <see cref="T:System.String" /> that contains the Value of the cookie.
|
||||||
</value>
|
</value>
|
||||||
|
<exception cref="T:WebSocketSharp.Net.CookieException">
|
||||||
|
<para>
|
||||||
|
The value specified for a set operation is <see langword="null" />.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
- or -
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The value specified for a set operation contains a string not enclosed in double quotes
|
||||||
|
that contains an invalid character.
|
||||||
|
</para>
|
||||||
|
</exception>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WebSocketSharp.Net.Cookie.Version">
|
<member name="P:WebSocketSharp.Net.Cookie.Version">
|
||||||
<summary>
|
<summary>
|
||||||
|
@ -207,7 +207,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<h1 class="PageTitle" id="T:WebSocketSharp.Net.Cookie">Cookie Class</h1>
|
<h1 class="PageTitle" id="T:WebSocketSharp.Net.Cookie">Cookie Class</h1>
|
||||||
<p class="Summary" id="T:WebSocketSharp.Net.Cookie:Summary">
|
<p class="Summary" id="T:WebSocketSharp.Net.Cookie:Summary">
|
||||||
Provides a set of properties and methods to use to manage the HTTP Cookie.
|
Provides a set of properties and methods used to manage an HTTP Cookie.
|
||||||
</p>
|
</p>
|
||||||
<div id="T:WebSocketSharp.Net.Cookie:Signature">
|
<div id="T:WebSocketSharp.Net.Cookie:Signature">
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
@ -216,8 +216,16 @@
|
|||||||
<div class="Remarks" id="T:WebSocketSharp.Net.Cookie:Docs">
|
<div class="Remarks" id="T:WebSocketSharp.Net.Cookie:Docs">
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="T:WebSocketSharp.Net.Cookie:Docs:Remarks">
|
<div class="SectionBox" id="T:WebSocketSharp.Net.Cookie:Docs:Remarks">
|
||||||
|
<p>
|
||||||
|
The Cookie class supports the following cookie formats:
|
||||||
|
Netscape specification,
|
||||||
|
RFC 2109 and
|
||||||
|
RFC 2965.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
The Cookie class cannot be inherited.
|
The Cookie class cannot be inherited.
|
||||||
</div>
|
</p>
|
||||||
|
</div>
|
||||||
<h2 class="Section">Requirements</h2>
|
<h2 class="Section">Requirements</h2>
|
||||||
<div class="SectionBox" id="T:WebSocketSharp.Net.Cookie:Docs:Version Information">
|
<div class="SectionBox" id="T:WebSocketSharp.Net.Cookie:Docs:Version Information">
|
||||||
<b>Namespace: </b>WebSocketSharp.Net<br /><b>Assembly: </b>websocket-sharp (in websocket-sharp.dll)</div>
|
<b>Namespace: </b>WebSocketSharp.Net<br /><b>Assembly: </b>websocket-sharp (in websocket-sharp.dll)</div>
|
||||||
@ -1239,6 +1247,32 @@
|
|||||||
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.Cookie.Value:Value">
|
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.Cookie.Value:Value">
|
||||||
A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> that contains the Value of the cookie.
|
A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> that contains the Value of the cookie.
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
<h4 class="Subsection">Exceptions</h4>
|
||||||
|
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.Cookie.Value:Exceptions">
|
||||||
|
<table class="TypeDocumentation">
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Reason</th>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="../WebSocketSharp.Net/CookieException.html">WebSocketSharp.Net.CookieException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
The value specified for a set operation is <tt>null</tt>.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
- or -
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The value specified for a set operation contains a string not enclosed in double quotes
|
||||||
|
that contains an invalid character.
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="P:WebSocketSharp.Net.Cookie.Value:Remarks">
|
<div class="SectionBox" id="P:WebSocketSharp.Net.Cookie.Value:Remarks">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
||||||
|
@ -223,7 +223,7 @@
|
|||||||
<a href="./Cookie.html">Cookie</a>
|
<a href="./Cookie.html">Cookie</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Provides a set of properties and methods to use to manage the HTTP Cookie.
|
Provides a set of properties and methods used to manage an HTTP Cookie.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
|
@ -315,7 +315,7 @@
|
|||||||
<a href="WebSocketSharp.Net/Cookie.html">Cookie</a>
|
<a href="WebSocketSharp.Net/Cookie.html">Cookie</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Provides a set of properties and methods to use to manage the HTTP Cookie.
|
Provides a set of properties and methods used to manage an HTTP Cookie.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
|
@ -10,11 +10,19 @@
|
|||||||
<Interfaces />
|
<Interfaces />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>
|
<summary>
|
||||||
Provides a set of properties and methods to use to manage the HTTP Cookie.
|
Provides a set of properties and methods used to manage an HTTP Cookie.
|
||||||
</summary>
|
</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
|
<para>
|
||||||
|
The Cookie class supports the following cookie formats:
|
||||||
|
<see href="http://web.archive.org/web/20020803110822/http://wp.netscape.com/newsref/std/cookie_spec.html">Netscape specification</see>,
|
||||||
|
<see href="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</see> and
|
||||||
|
<see href="http://www.ietf.org/rfc/rfc2965.txt">RFC 2965</see>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
The Cookie class cannot be inherited.
|
The Cookie class cannot be inherited.
|
||||||
</remarks>
|
</para>
|
||||||
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
<Members>
|
<Members>
|
||||||
<Member MemberName=".ctor">
|
<Member MemberName=".ctor">
|
||||||
@ -484,6 +492,18 @@
|
|||||||
A <see cref="T:System.String" /> that contains the Value of the cookie.
|
A <see cref="T:System.String" /> that contains the Value of the cookie.
|
||||||
</value>
|
</value>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
|
<exception cref="T:WebSocketSharp.Net.CookieException">
|
||||||
|
<para>
|
||||||
|
The value specified for a set operation is <see langword="null" />.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
- or -
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The value specified for a set operation contains a string not enclosed in double quotes
|
||||||
|
that contains an invalid character.
|
||||||
|
</para>
|
||||||
|
</exception>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Version">
|
<Member MemberName="Version">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Overview>
|
<Overview>
|
||||||
<Assemblies>
|
<Assemblies>
|
||||||
<Assembly Name="websocket-sharp" Version="1.0.2.32268">
|
<Assembly Name="websocket-sharp" Version="1.0.2.27822">
|
||||||
<AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 11 00 00 00 29 17 fb 89 fe c3 91 f7 2b cb 8b e2 61 d2 3f 05 93 6d 65 a8 9e 63 72 a6 f5 d5 2c f2 9d 20 fa 0b c0 70 6a f6 88 7e 8b 90 3f 39 f5 76 c8 48 e0 bb 7b b2 7b ed d3 10 a7 1a 0f 70 98 0f 7f f4 4b 53 09 d2 a5 ef 36 c3 56 b4 aa f0 91 72 63 25 07 89 e0 93 3e 3f 2e f2 b9 73 0e 12 15 5d 43 56 c3 f4 70 a5 89 fe f7 f6 ac 3e 77 c2 d8 d0 84 91 f4 0c d1 f3 8e dc c3 c3 b8 38 3d 0c bf 17 de 20 78 c1 ]</AssemblyPublicKey>
|
<AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 11 00 00 00 29 17 fb 89 fe c3 91 f7 2b cb 8b e2 61 d2 3f 05 93 6d 65 a8 9e 63 72 a6 f5 d5 2c f2 9d 20 fa 0b c0 70 6a f6 88 7e 8b 90 3f 39 f5 76 c8 48 e0 bb 7b b2 7b ed d3 10 a7 1a 0f 70 98 0f 7f f4 4b 53 09 d2 a5 ef 36 c3 56 b4 aa f0 91 72 63 25 07 89 e0 93 3e 3f 2e f2 b9 73 0e 12 15 5d 43 56 c3 f4 70 a5 89 fe f7 f6 ac 3e 77 c2 d8 d0 84 91 f4 0c d1 f3 8e dc c3 c3 b8 38 3d 0c bf 17 de 20 78 c1 ]</AssemblyPublicKey>
|
||||||
<Attributes>
|
<Attributes>
|
||||||
<Attribute>
|
<Attribute>
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user