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