summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-13 15:07:05 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-13 15:07:05 +0000
commit8d76a4a3b1051c55c772f46fa9da8531ddb4efc3 (patch)
tree9ba2058b95196be5136167fa4713e10baac26b2f /net/url_request
parent35017006d5a0b454c21d8337280877f15a1fdafe (diff)
downloadchromium_src-8d76a4a3b1051c55c772f46fa9da8531ddb4efc3.zip
chromium_src-8d76a4a3b1051c55c772f46fa9da8531ddb4efc3.tar.gz
chromium_src-8d76a4a3b1051c55c772f46fa9da8531ddb4efc3.tar.bz2
Pass the file size infomration from the FTP network transaction
to higher parts of the network stack. BUG=23794 TEST=Covered by net_unittest, also see the bug. Review URL: http://codereview.chromium.org/601027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request_new_ftp_job.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/url_request/url_request_new_ftp_job.cc b/net/url_request/url_request_new_ftp_job.cc
index c4c3782..171eed9 100644
--- a/net/url_request/url_request_new_ftp_job.cc
+++ b/net/url_request/url_request_new_ftp_job.cc
@@ -146,6 +146,12 @@ void URLRequestNewFtpJob::OnStartCompleted(int result) {
return;
// Clear the IO_PENDING status
SetStatus(URLRequestStatus());
+
+ // FTP obviously doesn't have HTTP Content-Length header. We have to pass
+ // the content size information manually.
+ set_expected_content_size(
+ transaction_->GetResponseInfo()->expected_content_size);
+
if (result == net::OK) {
NotifyHeadersComplete();
} else if (transaction_->GetResponseInfo()->needs_auth) {