public void ProcessRequest() { _textParts = new StringBuilder(); PushReaderBase reader; if (string.Equals(_httpRequest.ContentType, "application/octet-stream", StringComparison.InvariantCultureIgnoreCase)) reader = new SingleFilePushReader(_requestStream, this); else reader = new MimePushReader(_requestStream, this, _boundary, _httpRequest.ContentEncoding); // TODO: detect if ASP.NET has already read the request and throw an exception string data = _httpRequest.Headers["X-SlickUpload-Data"]; if (!string.IsNullOrEmpty(data)) MimeHelper.ParseQueryStringToDictionary(data, _request.Data); //try //{ reader.Parse(); /*} catch (DisconnectedException) { if (_currentStream != null) _currentStream.Close(); throw; }*/ _httpRequest.InjectTextParts(_textParts.ToString()); }
public void ProcessRequest() { _textParts = new StringBuilder(); PushReaderBase reader; if (string.Equals(_httpRequest.ContentType, "application/octet-stream", StringComparison.InvariantCultureIgnoreCase)) { reader = new SingleFilePushReader(_requestStream, this); } else { reader = new MimePushReader(_requestStream, this, _boundary, _httpRequest.ContentEncoding); } // TODO: detect if ASP.NET has already read the request and throw an exception string data = _httpRequest.Headers["X-SlickUpload-Data"]; if (!string.IsNullOrEmpty(data)) { MimeHelper.ParseQueryStringToDictionary(data, _request.Data); } //try //{ reader.Parse(); /*} * catch (DisconnectedException) * { * if (_currentStream != null) * _currentStream.Close(); * * throw; * }*/ _httpRequest.InjectTextParts(_textParts.ToString()); }