freshplayerplugin icon indicating copy to clipboard operation
freshplayerplugin copied to clipboard

Stormfall, Age of War

Open mcwimpy opened this issue 10 years ago • 2 comments

Hello!

I love to use Freshplayer oon Ubuntu, always the latest from the repository. Here you can see how i have configured WebUp2Date and Pepper PPA's .... auswahl_011

Now i also love to use Firefox and Facebook with it, especially a game with the title mentioned in the head line. Now for a couple of months i have watched the development of your SW, and hoped that some day it will work. After every update i checked it. Always with the same result.

This Flash App says "could not complete action" after loading for a while... so until now i can just use Chromium to play it. So i thought "is there anything i can do to help you, so that freshplayer might work with that site?" hope you can tell me :-)

URL of site in question: https://apps.facebook.com/stormfall

mcwimpy avatar Jul 02 '15 13:07 mcwimpy

and hoped that some day it will work

That could be a long wait. I think the issue is caused by Firefox code.

When NPAPI plugin makes a POST request, it writes request body along with custom headers into a file and then passes that file to the browser. Latter then reads file content and tries to determine where headers end and request body starts. But it turned out Firefox scans only first 1024 bytes, so if headers are larger (in that case they are about 1060 bytes), Firefox just thinks there are no custom headers at all, which results in a wrong request.

The following patch (for Firefox) fixes the issue on my machine.

--- a/dom/plugins/base/nsPluginHost.cpp 2015-05-26 00:28:50.000000000 +0300
+++ b/dom/plugins/base/nsPluginHost.cpp 2015-07-02 23:50:23.790305831 +0300
@@ -3663,12 +3663,12 @@
     if (NS_FAILED(rv))
       return rv;

-    char buf[1024];
+    char buf[8192];
     uint32_t br, bw;
     bool firstRead = true;
     while (1) {
       // Read() mallocs if buffer is null
-      rv = inStream->Read(buf, 1024, &br);
+      rv = inStream->Read(buf, sizeof(buf), &br);
       if (NS_FAILED(rv) || (int32_t)br <= 0)
         break;
       if (firstRead) {

i-rinat avatar Jul 02 '15 20:07 i-rinat

(Reported to upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1180025)

i-rinat avatar Jul 02 '15 23:07 i-rinat