gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog plugin/plugin.cpp server/vm/ASH...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog plugin/plugin.cpp server/vm/ASH...
Date: Wed, 30 Jan 2008 23:32:58 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/01/30 23:32:58

Modified files:
        .              : ChangeLog 
        plugin         : plugin.cpp 
        server/vm      : ASHandlers.cpp 

Log message:
                  Encode target string in the GETURL request line.
                  Is acceptable as long as neither target string nor url
                  contain newline.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5530&r2=1.5531
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.cpp?cvsroot=gnash&r1=1.95&r2=1.96
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.189&r2=1.190

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5530
retrieving revision 1.5531
diff -u -b -r1.5530 -r1.5531
--- ChangeLog   30 Jan 2008 22:42:40 -0000      1.5530
+++ ChangeLog   30 Jan 2008 23:32:57 -0000      1.5531
@@ -1,5 +1,12 @@
 2008-01-30 Sandro Santilli <address@hidden>
 
+       * plugin/plugin.cpp, server/vm/ASHandlers.cpp:
+         Encode target string in the GETURL request line.
+         Is acceptable as long as neither target string nor url
+         contain newline.
+
+2008-01-30 Sandro Santilli <address@hidden>
+
        * plugin/plugin.{cpp,h}: make player request handling line-based
          (each line is one request).
        * server/vm/ASHandlers.cpp (CommonGetUrl): pass the original url to

Index: plugin/plugin.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- plugin/plugin.cpp   30 Jan 2008 22:42:41 -0000      1.95
+++ plugin/plugin.cpp   30 Jan 2008 23:32:58 -0000      1.96
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: plugin.cpp,v 1.95 2008/01/30 22:42:41 strk Exp $ */
+/* $Id: plugin.cpp,v 1.96 2008/01/30 23:32:58 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "gnashconfig.h"
@@ -629,10 +629,26 @@
                return false;
        }
 
-       char* url = buf+4;
-       char* target = "_top"; // todo: fix
+       char* target = buf+4;
+       if ( ! *target )
+       {
+               cout << "No target found after GET request" << endl;
+               return false;
+       }
+       char* url = target;
+       while (*url && *url != ':') ++url;
+       if ( *url )
+       {
+               *url='\0';
+               ++url;
+       }
+       else
+       {
+               cout << "No colon found after target string" << endl;
+               return false;
+       }
 
-       cout << "Asked to get URL '" << url << "'" << endl;
+       cout << "Asked to get URL '" << url << "' in target '" << target << "'" 
<< endl;
        NPN_GetURL(_instance, url, target);
        return true;
 }

Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -b -r1.189 -r1.190
--- server/vm/ASHandlers.cpp    30 Jan 2008 22:42:44 -0000      1.189
+++ server/vm/ASHandlers.cpp    30 Jan 2008 23:32:58 -0000      1.190
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: ASHandlers.cpp,v 1.189 2008/01/30 22:42:44 strk Exp $ */
+/* $Id: ASHandlers.cpp,v 1.190 2008/01/30 23:32:58 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "gnashconfig.h"
@@ -2315,18 +2315,9 @@
                log_debug("user-provided host requests fd is %d", hostfd);
                std::stringstream request;
 
-               // TODO: define a format for othe requests, we'll either need
-               //       to use separators and escaping or header specified size
-               //
-               // for now will just omit the target and let the handler 
consider
-               // all as an url
-               //
-               //request << "GET " << url << " " << target_string << endl;
-               log_unimpl("target window %s load (we'll load in _top) always", 
target_string.c_str());
-
                // use the original url, non parsed (the browser will know 
better how to resolve relative urls and handle hactionscript)
                //request << "GET " << url << endl;
-               request << "GET " << url_c << endl;
+               request << "GET " << target_string << ":" << url_c << endl;
 
                string requestString = request.str();
                const char* cmd = requestString.c_str();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]