Пример #1
0
        public override void Close()
        {
            try
            {
                if (_responseStream != null)
                {
                    _responseStream.Close();
                }
            }
            finally
            {
                _responseStream = null;

                if (!_isHttpMethodClosed)
                {
                    _httpMethod.releaseConnection();
                    if (_stateCache != null && _state != null)
                    {
                        _stateCache.ReleaseHttpState(_state);
                        _state      = null;
                        _stateCache = null;
                    }
                    _isHttpMethodClosed = true;
                }
            }
        }
Пример #2
0
		internal HttpWebResponse(mainsoft.apache.commons.httpclient.HttpMethod httpMethod,
			mainsoft.apache.commons.httpclient.HttpState state,
			HttpStateCache stateCache,
			Uri uri, string method)
		{
			_httpMethod = httpMethod;
			_uri = uri;
			_method = method;
			_state = state;
			_stateCache = stateCache;
		}
Пример #3
0
 internal HttpWebResponse(mainsoft.apache.commons.httpclient.HttpMethod httpMethod,
                          mainsoft.apache.commons.httpclient.HttpState state,
                          HttpStateCache stateCache,
                          Uri uri, string method)
 {
     _httpMethod = httpMethod;
     _uri        = uri;
     _method     = method;
     _state      = state;
     _stateCache = stateCache;
 }
Пример #4
0
		public override void Close()
		{
			try
			{
				if(_responseStream != null)
					_responseStream.Close();
			}
			finally
			{
				_responseStream = null;

				if (!_isHttpMethodClosed)
				{
					_httpMethod.releaseConnection();
					if(_stateCache != null && _state != null)
					{
						_stateCache.ReleaseHttpState(_state);
						_state = null;
						_stateCache = null;
					}
					_isHttpMethodClosed = true;
				}
			}
		}