[Modify] Polish it
This commit is contained in:
parent
46f4649106
commit
5ed71dad88
@ -876,15 +876,24 @@ namespace WebSocketSharp.Net
|
||||
}
|
||||
|
||||
private void doWithCheckingState (
|
||||
Action <string, string> action, string name, string value, bool setState)
|
||||
Action <string, string> action, string name, string value, bool setState
|
||||
)
|
||||
{
|
||||
var type = checkHeaderType (name);
|
||||
if (type == HttpHeaderType.Request)
|
||||
doWithCheckingState (action, name, value, false, setState);
|
||||
else if (type == HttpHeaderType.Response)
|
||||
var headerType = checkHeaderType (name);
|
||||
|
||||
if (headerType == HttpHeaderType.Response) {
|
||||
doWithCheckingState (action, name, value, true, setState);
|
||||
else
|
||||
action (name, value);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (headerType == HttpHeaderType.Request) {
|
||||
doWithCheckingState (action, name, value, false, setState);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
action (name, value);
|
||||
}
|
||||
|
||||
private void doWithCheckingState (
|
||||
|
Loading…
Reference in New Issue
Block a user