示例#1
0
 private void ParseReasonPhrase()
 {
     sb.Clear();
     while (c != -1 && !HttpChar.IsControl(c))
     {
         sb.Append((char)c);
         c = TextStore.ReadChar();
     }
     StatusLine.ReasonPhrase = sb.ToString();
 }
 protected bool ParseText()
 {
     if (ParseLinearWhiteSpace())
     {
         return(true);
     }
     else if (HttpChar.IsControl(c))
     {
         return(false);
     }
     else
     {
         sb.Append((char)c);
         c = TextStore.ReadChar();
         return(true);
     }
 }
 protected bool ParseString()
 {
     if (HttpChar.IsChar(c) && !HttpChar.IsControl(c) && c != HttpChar.SP)
     {
         sb.Clear();
         sb.Append((char)c);
         c = TextStore.ReadChar();
     }
     else
     {
         return(false);
     }
     while (HttpChar.IsChar(c) && !HttpChar.IsControl(c) && c != HttpChar.SP)
     {
         sb.Append((char)c);
         c = TextStore.ReadChar();
     }
     return(true);
 }
 protected bool ParseToken()
 {
     if (HttpChar.IsChar(c) && !HttpChar.IsControl(c) && !HttpChar.IsSeparator(c))
     {
         sb.Clear();
         sb.Append((char)c);
         c = TextStore.ReadChar();
     }
     else
     {
         return(false);
     }
     while (HttpChar.IsChar(c) && !HttpChar.IsControl(c) && !HttpChar.IsSeparator(c))
     {
         sb.Append((char)c);
         c = TextStore.ReadChar();
     }
     return(true);
 }