Clear() public method

Disposes all held HttpFile's and resets values
public Clear ( ) : void
return void
Example #1
0
 /// <summary>
 /// Clear everything in the request
 /// </summary>
 public void Clear()
 {
     _body.Dispose();
     _body          = new MemoryStream();
     _contentLength = 0;
     _method        = string.Empty;
     _uri           = HttpHelper.EmptyUri;
     _queryString   = HttpInput.Empty;
     _bodyBytesLeft = 0;
     _headers.Clear();
     _connection = ConnectionType.Close;
     IsAjax      = false;
     _form.Clear();
 }
Example #2
0
 /// <summary>
 /// Clear everything in the request
 /// </summary>
 public void Clear()
 {
     //return;
     _body.Dispose();
     _body          = new MemoryStream();
     _contentLength = 0;
     _method        = string.Empty;
     _uri           = null;
     _queryString   = HttpInput.Empty;
     _bodyBytesLeft = 0;
     _headers.Clear();
     _connection = ConnectionType.Close;
     _param.SetForm(HttpInput.Empty);
     _param.SetQueryString(HttpInput.Empty);
     IsAjax = false;
     _form.Clear();
 }
Example #3
0
 /// <summary>
 /// Clear everything in the request
 /// </summary>
 public void Clear()
 {
     if (_body != null && _body.CanRead)
     {
         _body.Dispose();
     }
     _body          = null;
     _contentLength = 0;
     _method        = string.Empty;
     _uri           = HttpHelper.EmptyUri;
     _queryString   = HttpInput.Empty;
     _bodyBytesLeft = 0;
     _headers.Clear();
     _connection = ConnectionType.KeepAlive;
     IsAjax      = false;
     _form.Clear();
 }