[Modify] Only support HTTP/1.1
This commit is contained in:
parent
8e76ae15f9
commit
9b7feae076
@ -503,65 +503,16 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the HTTP version used for the response.
|
/// Gets the HTTP version used for the response.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="Version"/> that represents the HTTP version used for
|
/// A <see cref="Version"/> that represents the HTTP version used for
|
||||||
/// the response.
|
/// the response.
|
||||||
/// </value>
|
/// </value>
|
||||||
/// <exception cref="ArgumentNullException">
|
|
||||||
/// The value specified for a set operation is <see langword="null"/>.
|
|
||||||
/// </exception>
|
|
||||||
/// <exception cref="ArgumentException">
|
|
||||||
/// <para>
|
|
||||||
/// The value specified for a set operation does not have its Major
|
|
||||||
/// property set to 1.
|
|
||||||
/// </para>
|
|
||||||
/// <para>
|
|
||||||
/// -or-
|
|
||||||
/// </para>
|
|
||||||
/// <para>
|
|
||||||
/// The value specified for a set operation does not have its Minor
|
|
||||||
/// property set to either 0 or 1.
|
|
||||||
/// </para>
|
|
||||||
/// </exception>
|
|
||||||
/// <exception cref="InvalidOperationException">
|
|
||||||
/// The response is already being sent.
|
|
||||||
/// </exception>
|
|
||||||
/// <exception cref="ObjectDisposedException">
|
|
||||||
/// This instance is closed.
|
|
||||||
/// </exception>
|
|
||||||
public Version ProtocolVersion {
|
public Version ProtocolVersion {
|
||||||
get {
|
get {
|
||||||
return _version;
|
return _version;
|
||||||
}
|
}
|
||||||
|
|
||||||
set {
|
|
||||||
if (_disposed) {
|
|
||||||
var name = GetType ().ToString ();
|
|
||||||
throw new ObjectDisposedException (name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_headersSent) {
|
|
||||||
var msg = "The response is already being sent.";
|
|
||||||
throw new InvalidOperationException (msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value == null)
|
|
||||||
throw new ArgumentNullException ("value");
|
|
||||||
|
|
||||||
if (value.Major != 1) {
|
|
||||||
var msg = "Its Major property is not 1.";
|
|
||||||
throw new ArgumentException (msg, "value");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value.Minor < 0 || value.Minor > 1) {
|
|
||||||
var msg = "Its Minor property is not 0 or 1.";
|
|
||||||
throw new ArgumentException (msg, "value");
|
|
||||||
}
|
|
||||||
|
|
||||||
_version = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user