Modified HttpHeaderType.cs

This commit is contained in:
sta 2013-04-29 16:55:57 +09:00
parent a83920660d
commit 2a816ef0c8
22 changed files with 17 additions and 17 deletions

Binary file not shown.

View File

@ -4,7 +4,7 @@
// Authors: // Authors:
// sta (sta.blockhead@gmail.com) // sta (sta.blockhead@gmail.com)
// //
// Copyright (c) 2013 sta.blockhead (sta.blockhead@gmail.com) // Copyright (c) 2013 sta.blockhead
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the

View File

@ -4,7 +4,7 @@
// Authors: // Authors:
// sta (sta.blockhead@gmail.com) // sta (sta.blockhead@gmail.com)
// //
// Copyright (c) 2013 sta.blockhead (sta.blockhead@gmail.com) // Copyright (c) 2013 sta.blockhead
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -33,12 +33,12 @@ namespace WebSocketSharp.Net {
[Flags] [Flags]
enum HttpHeaderType enum HttpHeaderType
{ {
Undefined, Unspecified = 0,
Request, Request = 1,
Response, Response = 1 << 1,
Restricted, Restricted = 1 << 2,
MultiValue, MultiValue = 1 << 3,
MultiValueInRequest, MultiValueInRequest = 1 << 4,
MultiValueInResponse MultiValueInResponse = 1 << 5
} }
} }

View File

@ -10,7 +10,7 @@
// //
// Copyright (c) 2003 Ximian, Inc. (http://www.ximian.com) // Copyright (c) 2003 Ximian, Inc. (http://www.ximian.com)
// Copyright (c) 2007 Novell, Inc. (http://www.novell.com) // Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
// Copyright (c) 2012-2013 sta.blockhead (sta.blockhead@gmail.com) // Copyright (c) 2012-2013 sta.blockhead
// //
// Permission is hereby granted, free of charge, to any person obtaining // Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the // a copy of this software and associated documentation files (the
@ -253,7 +253,7 @@ namespace WebSocketSharp.Net {
internal WebHeaderCollection (bool internallyCreated) internal WebHeaderCollection (bool internallyCreated)
{ {
this.internallyCreated = internallyCreated; this.internallyCreated = internallyCreated;
state = HttpHeaderType.Undefined; state = HttpHeaderType.Unspecified;
} }
/// <summary> /// <summary>
@ -299,7 +299,7 @@ namespace WebSocketSharp.Net {
public WebHeaderCollection () public WebHeaderCollection ()
{ {
internallyCreated = false; internallyCreated = false;
state = HttpHeaderType.Undefined; state = HttpHeaderType.Unspecified;
} }
#endregion #endregion
@ -457,12 +457,12 @@ namespace WebSocketSharp.Net {
{ {
HttpHeaderInfo info; HttpHeaderInfo info;
return !TryGetHeaderInfo (name, out info) return !TryGetHeaderInfo (name, out info)
? HttpHeaderType.Undefined ? HttpHeaderType.Unspecified
: info.IsRequest && !info.IsResponse : info.IsRequest && !info.IsResponse
? HttpHeaderType.Request ? HttpHeaderType.Request
: !info.IsRequest && info.IsResponse : !info.IsRequest && info.IsResponse
? HttpHeaderType.Response ? HttpHeaderType.Response
: HttpHeaderType.Undefined; : HttpHeaderType.Unspecified;
} }
static string CheckName (string name) static string CheckName (string name)
@ -485,7 +485,7 @@ namespace WebSocketSharp.Net {
void CheckState (bool response) void CheckState (bool response)
{ {
if (state == HttpHeaderType.Undefined) if (state == HttpHeaderType.Unspecified)
return; return;
if (response && state == HttpHeaderType.Request) if (response && state == HttpHeaderType.Request)
@ -568,7 +568,7 @@ namespace WebSocketSharp.Net {
void SetState (bool response) void SetState (bool response)
{ {
if (state == HttpHeaderType.Undefined) if (state == HttpHeaderType.Unspecified)
state = response state = response
? HttpHeaderType.Response ? HttpHeaderType.Response
: HttpHeaderType.Request; : HttpHeaderType.Request;
@ -862,7 +862,7 @@ namespace WebSocketSharp.Net {
public override void Clear () public override void Clear ()
{ {
base.Clear (); base.Clear ();
state = HttpHeaderType.Undefined; state = HttpHeaderType.Unspecified;
} }
/// <summary> /// <summary>

Binary file not shown.