private void ParseHeader(string key, string value)
{
switch (key) {
case "accept":
Accept = value;
break;
case "accept-charset":
AcceptCharset = value;
break;
case "accept-encoding":
AcceptEncoding = value;
break;
case "accept-language":
AcceptLanguage = value;
break;
case "authorization":
Authorization = value;
break;
case "content-length":
long.TryParse (value, out ContentLength);
break;
case "connection":
if (value.ToLowerInvariant () == "keep-alive")
KeepAlive = true;
if (value == "close")
KeepAlive = false;
break;
case "expect":
Expect = value;
break;
case "from":
From = value;
break;
case "host":
Host = value;
break;
case "if-match":
IfMatch = value;
break;
case "if-modified-since":
IfModifiedSince = value;
break;
case "if-none-match":
IfNoneMatch = value;
break;
case "if-range":
IfRange = value;
break;
case "if-unmodified-since":
IfUnmodifiedSince = value;
break;
case "max-forwards":
MaxForwards = value;
break;
case "proxy-authorization":
ProxyAuthorization = value;
break;
case "range":
Range = value;
break;
case "referer":
Referer = value;
break;
case "te":
TE = value;
break;
case "user-agent":
UserAgent = value;
break;
}
}