diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 8802e7adc9d..a4eba13dceb 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -1097,7 +1097,7 @@ nsPluginHost::InstantiateEmbeddedPlugin(const char *aMimeType, nsIURI* aURL, const char *value; bool havedata = NS_SUCCEEDED(pti->GetAttribute("SRC", &value)); if (havedata && !isJava && bCanHandleInternally && !aContent->SrcStreamLoading()) { - NewEmbeddedPluginStream(aURL, nsnull, instance.get()); + NewEmbeddedPluginStream(aURL, aContent, instance.get()); } } @@ -3332,8 +3332,6 @@ nsresult nsPluginHost::NewEmbeddedPluginStream(nsIURI* aURL, nsObjectLoadingContent *aContent, nsNPAPIPluginInstance* aInstance) { - NS_ASSERTION(!aContent || !aInstance, "Don't pass both content and an instance to NewEmbeddedPluginStream!"); - nsCOMPtr listener; nsresult rv = NewEmbeddedPluginStreamListener(aURL, aContent, aInstance, getter_AddRefs(listener)); diff --git a/dom/plugins/test/mochitest/Makefile.in b/dom/plugins/test/mochitest/Makefile.in index 897150fcdec..f767edc4a25 100644 --- a/dom/plugins/test/mochitest/Makefile.in +++ b/dom/plugins/test/mochitest/Makefile.in @@ -110,6 +110,7 @@ _MOCHITEST_FILES = \ test_instance_unparent2.html \ test_instance_unparent3.html \ test_pluginstream_referer.html \ + test_pluginstream_src_referer.html \ plugin-stream-referer.sjs \ test_src_url_change.html \ $(NULL) diff --git a/dom/plugins/test/mochitest/plugin-stream-referer.sjs b/dom/plugins/test/mochitest/plugin-stream-referer.sjs index cca3e14dee9..a1c9692c958 100644 --- a/dom/plugins/test/mochitest/plugin-stream-referer.sjs +++ b/dom/plugins/test/mochitest/plugin-stream-referer.sjs @@ -1,6 +1,8 @@ function handleRequest(request, response) { response.setHeader('Content-Type', 'text/plain', false); + response.setHeader('Cache-Control', 'no-cache', false); + response.setHeader('Content-Type', 'application/x-test', false); if (request.hasHeader('Referer')) { response.write('Referer found: ' + request.getHeader('Referer')); } diff --git a/dom/plugins/test/mochitest/test_pluginstream_src_referer.html b/dom/plugins/test/mochitest/test_pluginstream_src_referer.html new file mode 100644 index 00000000000..fe85de4d069 --- /dev/null +++ b/dom/plugins/test/mochitest/test_pluginstream_src_referer.html @@ -0,0 +1,28 @@ + + Do plugin stream src requests send the Referer header correctly? + + + + +

+ + + + + + +