From 7a6db4024aa668fd49741c4c34965ab674efaac6 Mon Sep 17 00:00:00 2001 From: "jianli@chromium.org" Date: Wed, 24 Mar 2010 23:37:50 +0000 Subject: Support sending a sliced file in chromium. BUG=none TEST=The WebKit Layout test. Review URL: http://codereview.chromium.org/594036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42559 0039d316-1c4b-4281-b951-d872f2087c98 --- net/spdy/spdy_network_transaction.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'net/spdy/spdy_network_transaction.cc') diff --git a/net/spdy/spdy_network_transaction.cc b/net/spdy/spdy_network_transaction.cc index d7de332..c35c934 100644 --- a/net/spdy/spdy_network_transaction.cc +++ b/net/spdy/spdy_network_transaction.cc @@ -246,8 +246,13 @@ int SpdyNetworkTransaction::DoInitConnectionComplete(int result) { int SpdyNetworkTransaction::DoSendRequest() { next_state_ = STATE_SEND_REQUEST_COMPLETE; CHECK(!stream_.get()); - UploadDataStream* upload_data = request_->upload_data ? - new UploadDataStream(request_->upload_data) : NULL; + UploadDataStream* upload_data = NULL; + if (request_->upload_data) { + int error_code; + upload_data = UploadDataStream::Create(request_->upload_data, &error_code); + if (!upload_data) + return error_code; + } stream_ = spdy_->GetOrCreateStream(*request_, upload_data, net_log_); // Release the reference to |spdy_| since we don't need it anymore. spdy_ = NULL; -- cgit v1.1