summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 21:43:20 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 21:43:20 +0000
commit8ef59c3b8d485227dae56a1ce4edc784be329f59 (patch)
tree68344d77979b8a468e5d2c95e3798b87adfd836d /chrome/browser
parent4a324a1705813d626833e38539f3cc3bf27b2627 (diff)
downloadchromium_src-8ef59c3b8d485227dae56a1ce4edc784be329f59.zip
chromium_src-8ef59c3b8d485227dae56a1ce4edc784be329f59.tar.gz
chromium_src-8ef59c3b8d485227dae56a1ce4edc784be329f59.tar.bz2
Fix problem where "text/xml" responses get buffered past 512 bytes, causing the response to be truncated.
BUG=3521 Review URL: http://codereview.chromium.org/7610 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/resource_dispatcher_host.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc
index 597abba..85a0fb8 100644
--- a/chrome/browser/resource_dispatcher_host.cc
+++ b/chrome/browser/resource_dispatcher_host.cc
@@ -1179,6 +1179,7 @@ bool ResourceDispatcherHost::BufferedEventHandler::KeepBuffering(
// SniffMimeType() returns false if there is not enough data to determine
// the mime type. However, even if it returns false, it returns a new type
// that is probably better than the current one.
+ DCHECK(bytes_read_ < 512 /*kMaxBytesToSniff*/);
if (!finished_) {
buffering_ = true;
return true;