summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 05:19:56 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 05:19:56 +0000
commit0226693e3bf1aaf69584a4f72e2e4d65f5c22616 (patch)
treee1ff3f882043a7aa5030e04f903211e1520729a9 /webkit/glue/plugins
parent85220a1fa11c005285d24faf81f0d033b605b9b2 (diff)
downloadchromium_src-0226693e3bf1aaf69584a4f72e2e4d65f5c22616.zip
chromium_src-0226693e3bf1aaf69584a4f72e2e4d65f5c22616.tar.gz
chromium_src-0226693e3bf1aaf69584a4f72e2e4d65f5c22616.tar.bz2
Always send the stream headers to the plugin, not just for seekable ones.
Also, do case-insensitive search for "accept-ranges" since some servers use weird casings. Review URL: http://codereview.chromium.org/603014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r--webkit/glue/plugins/plugin_stream.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/webkit/glue/plugins/plugin_stream.cc b/webkit/glue/plugins/plugin_stream.cc
index 25a33e8..6acfb7c 100644
--- a/webkit/glue/plugins/plugin_stream.cc
+++ b/webkit/glue/plugins/plugin_stream.cc
@@ -34,11 +34,13 @@ bool PluginStream::Open(const std::string &mime_type,
stream_.pdata = 0;
stream_.ndata = id->ndata;
stream_.notifyData = notify_data_;
+ if (!headers_.empty())
+ stream_.headers = headers_.c_str();
bool seekable_stream = false;
- if (request_is_seekable && !headers_.empty()) {
- stream_.headers = headers_.c_str();
- if (headers_.find("Accept-Ranges: bytes") != std::string::npos) {
+ if (request_is_seekable) {
+ std::string headers_lc = StringToLowerASCII(headers);
+ if (headers_lc.find("accept-ranges: bytes") != std::string::npos) {
seekable_stream = true;
}
}