diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 23:06:09 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 23:06:09 +0000 |
commit | 013f3065b739ecffb04792805e6edc0429886fb6 (patch) | |
tree | be2472a0e92b12e8d3773b64597922ed375ab07d /webkit/glue/webplugin_impl.cc | |
parent | a37bea8f194682046c02a681ccc743e5c6bd2098 (diff) | |
download | chromium_src-013f3065b739ecffb04792805e6edc0429886fb6.zip chromium_src-013f3065b739ecffb04792805e6edc0429886fb6.tar.gz chromium_src-013f3065b739ecffb04792805e6edc0429886fb6.tar.bz2 |
Use the boundary_pos parameter passed to the MultiPartResponseClient::didReceiveData function as the length of the data. At times HTTP byte range requests return responses which specify invalid content ranges as per the spec, i.e. the last byte position is smaller than the first byte position, etc. I looked into Firefox's byte range parsing code and it always calculates the length based on the boundary position.
This fixes bug http://code.google.com/p/chromium/issues/detail?id=8802
Bug=8802
Review URL: http://codereview.chromium.org/87063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r-- | webkit/glue/webplugin_impl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc index 9d5b2c5..d23bb22 100644 --- a/webkit/glue/webplugin_impl.cc +++ b/webkit/glue/webplugin_impl.cc @@ -88,11 +88,10 @@ class MultiPartResponseClient : public WebCore::ResourceHandleClient { // Receives individual part data from a multipart response. virtual void didReceiveData(WebCore::ResourceHandle* handle, - const char* data, int boundary_pos, - int length_received) { - int data_length = byte_range_upper_bound_ - byte_range_lower_bound_ + 1; + const char* data, int data_size, + int reserved) { resource_client_->DidReceiveData( - data, data_length, byte_range_lower_bound_); + data, data_size, byte_range_lower_bound_); } void Clear() { |