summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_network_transaction.cc
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 23:37:50 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 23:37:50 +0000
commit7a6db4024aa668fd49741c4c34965ab674efaac6 (patch)
tree291de61ee2f86da940a5c9c0a67a79d394478a8e /net/spdy/spdy_network_transaction.cc
parente8b3ddfde11a59bc910697090906dd36f0426401 (diff)
downloadchromium_src-7a6db4024aa668fd49741c4c34965ab674efaac6.zip
chromium_src-7a6db4024aa668fd49741c4c34965ab674efaac6.tar.gz
chromium_src-7a6db4024aa668fd49741c4c34965ab674efaac6.tar.bz2
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
Diffstat (limited to 'net/spdy/spdy_network_transaction.cc')
-rw-r--r--net/spdy/spdy_network_transaction.cc9
1 files changed, 7 insertions, 2 deletions
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;